更多的权限在上传的APK比清单文件 [英] More Permissions in uploaded apk than in manifest file

查看:155
本文介绍了更多的权限在上传的APK比清单文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新我的应用程序,但上传后,我注意到有我不提我的清单附加权限:

I wanted to update my app but after uploading I noticed that there were additional permissions which I don't mention in my manifest:

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

我的清单看起来像这样

My manifest looks like this

<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>

我只用了权限的互联网和网络接入。哪里的其他权限从何而来?在应用程序中我使用也有一些谷歌播放服务,如多人和排行榜。我对版本所做的唯一更改之前一些版本更新(摇篮,播放服务,appcompat)和一些XML的修改。

I only use the permissions for Internet and Network access. Where do the other permissions come from? In the app I use also some google play services like multiplayer and leaderboards. The only changes that I made to the version before were some version updates (gradle,play-services,appcompat) and some xml modifications.

推荐答案

有些权限由谷歌添加播放服务。

Some permissions are being added by Google Play Services.

您可以通过只包括你实际需要的组件减少其添加的权限。例如谷歌演员,谷歌驱动器等

You can reduce the permissions it adds by only including the components that you actually need. e.g Google Cast, Google Drive etc

在这里看到如何做到这一点: https://developers.google.com/android/guides/setup

See here for how to do that: https://developers.google.com/android/guides/setup

例摇篮:

整个播放服务

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

只有游戏服务

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

这篇关于更多的权限在上传的APK比清单文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆