上传的 apk 中的权限多于清单文件中的权限

More Permissions in uploaded apk than in manifest file

我想更新我的应用程序,但在上传后我注意到还有一些我没有在我的清单中提及的额外权限:

android.permission.ACCESS_NETWORK_STATE
android.permission.GET_ACCOUNTS
android.permission.INTERNET
android.permission.READ_EXTERNAL_STORAGE
android.permission.USE_CREDENTIALS
android.permission.WRITE_EXTERNAL_STORAGE
com.google.android.c2dm.permission.RECEIVE

我的清单看起来像这样

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stepscience.yahtzee" >

<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/Theme.App" >
    <meta-data
        android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/app_id" />

    <activity
        android:name=".StartActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <activity
        android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent" />


</application>

我只使用互联网和网络访问权限。其他权限从何而来?在应用程序中,我还使用了一些 google 游戏服务,例如多人游戏和排行榜。我之前对版本所做的唯一更改是一些版本更新(gradle、play-services、appcompat)和一些 xml 修改。

Google Play 服务正在添加一些权限。

您可以通过仅包含您实际需要的组件来减少它添加的权限。例如 Google 投射,Google 驱动等

请参阅此处了解操作方法: https://developers.google.com/android/guides/setup

示例gradle:

整个 Play 服务

compile 'com.google.android.gms:play-services:7.8.0'

仅游戏服务

compile 'com.google.android.gms:play-services-games:7.8.0'