Ben*_*ins 5 android android-permissions react-native
我的应用程序不需要读取手机状态,因此我想从我的本机应用程序中删除权限.
每次我从项目的任何地方删除它,当我运行时它会再次重新添加 ./gradlew assembleRelease
如何让它停止添加?
Col*_*lCh 13
使用android清单合并
添加新文件 android/app/src/release/AndroidManifest.xml
内容
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
>
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
</manifest>
Run Code Online (Sandbox Code Playgroud)
完成!有关清单合并的更多信息:https://developer.android.com/studio/build/manifest-merge.html#merge_priorities,部分合并优先级
| 归档时间: |
|
| 查看次数: |
3230 次 |
| 最近记录: |