android:multiprocess

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,user,application,System,permissions)