This question already has answers here:
Android studio adds unwanted permission after running application on real device

(3个答案)


5年前关闭。




我刚刚发布了我的应用,但是我的应用权限确实有问题

我的应用程序使用了一些额外的权限,例如身份(在设备上查找帐户)和位置(大约位置(基于网络))。

我的清单XML中没有包含任何这些

我想知道为什么我会看到这些以及如何将其从我的应用程序中删除

我的应用程序中的权限

AndroidMainfest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <!--This meta-data tag is required to use Google Play Services.-->
    <meta-data android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version"/>
    <activity
        android:name=".MainActivity"
        android:screenOrientation="portrait"
        android:configChanges="keyboardHidden"
        android:label="@string/app_name" >
        <intent-filter android:label="@string/app_name_short">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <!--Include the AdActivity configChanges and theme. -->
    <activity android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent" />

我正在使用的库(build.gradle):
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.android.gms:play-services:7.5.0'
compile files('libs/commons-io-2.4.jar')

libs / commons-io-2.4 <

最佳答案

您正在使用播放服务的哪些部分?这很可能引起问题。您正在将位置,gcm等编译为最可能只需要广告的API。尝试将build.gradle中的compile 'com.google.android.gms:play-services:7.5.0'行替换为:

compile 'com.google.android.gms:play-services-ads:7.5.0'

如果您需要其他API,请在this list中找到它们,然后仅添加您正在使用的API。

10-07 19:27
查看更多