GET_ACCOUNTS APK 上传到 Google Play 商店时出现权限错误

GET_ACCOUNTS permission error with APK upload to Google Play Store

我用 Ionic 构建了一个项目,但我无法将我的 APK 上传到 Google Play 商店。我收到以下错误:

您的 APK 使用的权限需要隐私政策:(android.permission.GET_ACCOUNTS)

我可以在我的 AndroidManifest.xml 文件中看到此权限,如下所示。我将 Firebase 与他们的数据库 API、AngularFire2 一起使用。我需要为此制定隐私政策吗?这容易做到吗?:

<?xml version='1.0' encoding='utf-8'?> <manifest android:hardwareAccelerated="true" android:versionCode="2" android:versionName="0.0.2" package="io.ionic.habit" xmlns:android="http://schemas.android.com/apk/res/android"> <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true"> <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize"> <intent-filter android:label="@string/launcher_name"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="de.appplant.cordova.emailcomposer.Provider"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/emailcomposer_provider_paths" /> </provider> <receiver android:enabled="true" android:name="com.google.android.gms.analytics.AnalyticsReceiver"> <intent-filter> <action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" /> </intent-filter> </receiver> <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.AnalyticsService" /> <receiver android:enabled="true" android:exported="true" android:name="com.google.android.gms.analytics.CampaignTrackingReceiver"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.CampaignTrackingService" /> </application> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest>

GET_ACCOUNTS 已移至 Android 6.0(>6.0) 中的 CONTACTS 权限组。

由于您使用的是 targetSdkVersion 25(Android 7),请尝试在 AndroidManifest 文件中添加 READ_CONTACTS(和 WRITE_CONTACTS)使用权限。

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

或尝试privacy policy Permission (S) :

只需将隐私政策 url 添加到您在 Playstore 中的应用程序即可解决问题 您可以使用以下 urls

生成隐私政策

https://gist.github.com/alphamu/c42f6c3fce530ca5e804e672fed70d78

https://app-privacy-policy-generator.firebaseapp.com/