android:multiprocess
16lz
2021-01-23
1. 已经在Manifest.xml中加了相关权限,运行却出现权限错误。
java.lang.SecurityException: Neither user 10081 nor current process has android.permission.PACKAGE_USAGE_STATS.
解决:去掉android:multiprocess="true"
-
android:multiprocess
- Whether an instance of the activity can be launched into the process of the component that started it — "
true
" if it can be, and "false
" if not. The default value is "false
".Normally, a new instance of an activity is launched into the process of the application that defined it, so all instances of the activity run in the same process. However, if this flag is set to "
true
", instances of the activity can run in multiple processes, allowing the system to create instances wherever they are used (provided permissions allow it), something that is almost never necessary or desirable.
更多相关文章
- android 编译错误--超出接口数量限制
- Android APK权限大全
- Android——导入已存在的android工程时出现红叉错误“AndroidMan
- Android studio 启动问题,错误
- Android证书创建之 keytool 错误:java.io.IOException:Incorrect
- Android通过源码编译apk获得系统权限
- Android 网络链接,不要忘记添加网络权限。
- android 写文件权限
- Android 常用权限