警告:您的Apk正在使用需要隐私政策的权限:(android.permission.READ_PHONE_STATE)

132

清单文件中未添加android.permission.READ_PHONE_STATE权限。

为什么上传新版本时会出现以下错误。

您的应用程序具有版本代码1,请求以下权限:android.permission.READ_PHONE_STATE。在APK中使用这些权限的应用程序需要设置隐私政策。

我已经附上了我的Google Play商店帐户的截图。 输入图片说明文字

我的清单文件。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.my.package.name">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:name=".utils.PreferenceManager"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".SplashScreen"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait" />

        <activity
            android:name=".CategoryListActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ImagesActivity"
            android:screenOrientation="portrait" />

    </application>

</manifest>

1
你在移除权限之前,清单文件中是否存在该权限?并且你还没有上传新的 APK 吗? - aconnelly
在你的清单文件中添加读取手机状态权限。 - Noorul
2
看看这个:https://dev59.com/cOk5XIcBkEYKwwoY_O-N#42751979 - 0xAliHn
我想提醒您,为了解决这个问题,您必须将所有使用“play-services-”前缀的依赖项从12.0.0更新到12.0.1。因此,这包括任何东西,例如将“play-services-analytics:12.0.0”升级到“play-services-analytics:12.0.1”。这不仅限于play-services-ads,而是所有版本为12.0.0的play-services。 - ChallengeAccepted
我投票关闭此问题,因为https://meta.stackoverflow.com/q/272165/6296561。 - Zoe stands with Ukraine
显示剩余3条评论
22个回答

0

一步一步地看,你就会理解。

public static String getVideoTitle(String youtubeVideoUrl) {
        Log.e(youtubeVideoUrl.toString() + " In GetVideoTitle Menu".toString() ,"hiii" );
        try {

            if (youtubeVideoUrl != null) {
                URL embededURL = new URL("https://www.youtube.com/oembed?url=" +
                        youtubeVideoUrl + "&format=json"
                );
                Log.e(youtubeVideoUrl.toString() + " In EmbedJson Try Function ".toString() ,"hiii" );
                Log.e(embededURL.toString() + " In EmbedJson Retrn value ".toString() ,"hiii" );
                Log.e(new JSONObject(IOUtils.toString(embededURL)).getString("provider_name").toString() + " In EmbedJson Retrn value ".toString() ,"hiii" );

                return new JSONObject(IOUtils.toString(embededURL)).getString("provider_name").toString();
            }
        } catch (Exception e) {
            Log.e(" In catch Function ".toString() ,"hiii" );

            e.printStackTrace();
        }
        return null;
    }

2
请在您的代码中添加一些解释,以便其他人可以从中学习。 - Nico Haase

-1

我无法在Google上发布我的应用程序,因为在上传应用程序apk文件到Google测试“内部测试发布”后出现错误。 附上屏幕截图,请解决并建议如何解决此错误。 应用程序是由Mobiroller应用程序生成器生成的。 即使在我的应用程序中添加了隐私政策,仍然会看到错误消息:“您的APK或Android App Bundle正在使用需要隐私政策的权限:(android.permission.CAMERA)。 1

错误消息显示:“您的APK或Android App Bundle正在使用需要隐私政策的权限:(android.permission.CAMERA)。”


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接