unrequested permissions not declared in androidmanifest--crashlytics maybe?

戏子无情 提交于 2019-12-30 08:22:10

问题


I've just noticed that my app has new permission requests that I have not explicitly declared in my AndroidManifest.xml. I didn't see these declared in any of the manifests in the "intermediates" directory created by gradle, and the only dependency that I declare without an explicit version is crashlytics (as they suggest to do), i.e:

compile 'com.crashlytics.android:crashlytics:1.+'

The new permissions found in the full manifest are:

<android:uses-permission
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion="18" />
    <android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <android:uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:maxSdkVersion="18" />

So what my guess is that whatever new version of crashlytics is now requesting this?


回答1:


If you're using Gradle to build, you can add the following to your AndroidManifest.xml to remove the permission:

    <uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove" />



回答2:


There is an issue within the Android Gradle plugin version 1.0.0-rc1 that may be causing the behavior to happen: https://code.google.com/p/android/issues/detail?id=81017

Version 1.0.0 has a fix for this.

Crashlytics only requires the INTERNET permission to send crash reports.



来源:https://stackoverflow.com/questions/27410382/unrequested-permissions-not-declared-in-androidmanifest-crashlytics-maybe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!