我有一个react-native 应用程序在play store上运行了一段时间,最近我从play store收到了这个重要通知,声明如果我不修复这个问题,我的应用程序将从play store中删除.
有人能告诉我这是什么以及如何修复吗?
以下是Play store的完整信息
我们检测到你的应用在 list 文件1或1中包含requestLegacyExternalStorage标志
在运行Android 11+的设备上安装应用程序的开发者必须使用Scoped
- 更新你的应用程序以使用更隐私友好的最佳实践,例如
- 更新应用程序以声明 list 文件中的所有文件访问(管理外部存储)权限,并完成所有文件访问权限
- 完全从应用程序中删除"所有文件访问"权限.
对于针对Android 11的应用程序
未经授权请求访问所有文件访问权限的应用
我的Package.json
{
"@react-native-async-storage/async-storage": "^1.13.4",
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/bottom-tabs": "^5.11.8",
"@react-navigation/drawer": "^5.12.3",
"@react-navigation/material-bottom-tabs": "^5.3.14",
"@react-navigation/native": "^5.9.2",
"@react-navigation/stack": "^5.14.2",
"axios": "^0.21.1",
"fuse.js": "^6.4.6",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-device-info": "^8.0.1",
"react-native-gesture-handler": "^1.10.0",
"react-native-linear-gradient": "^2.5.6",
"react-native-paper": "^4.7.1",
"react-native-reanimated": "^1.13.2",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.17.1",
"react-native-svg": "^12.1.0",
"react-native-vector-icons": "^8.0.0"
}
并显示.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.elevel.fromto">
<uses-permission android:name="安卓准许互联网" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
此外,在Play Console under App bundle explorer中,我发现我的应用程序正在使用以下权限:
- 安卓准许互联网
- 通用域名格式.谷歌.安卓c2dm.准许接收
- 通用域名格式.谷歌.安卓芬斯基.准许绑定获取安装推荐服务