Permission Denial: get/set setting for user asks t

2020-04-02 02:13发布

问题:

My application works normally on my test device (When I install it via ADT & when I install it via the exported APK file) but it fails on Play Store testing device with the following error:

Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0, this requires android.permission.INTERACT_ACROSS_USERS_FULL

I'm new in Android world and I don't understand why it works on my device & it fails on the same device at Play Store test?

What this error type means in Android work environment?

I added the following permission

android.permission.INTERACT_ACROSS_USERS_FULL

in AndroidManifest.xml as recommended here: Permission Denial

But the application failed again to launch / open on their test device.

EDIT:

Test device running Android 4.3

回答1:

For anyone else who had this issue, for me it was simply a case of having an activity with the wrong name in the AndroidManifest.xml file.

I didn't need to add any permissions, once the activity name was corrected (in mine it stated the wrong package name), it ran fine.



回答2:

I ran into the same issue while trying to use move Files using the version of the application that I plan to post to market. The problem was that the files I was trying to move were created during the application development process by the app that was signed with the debug certificate. So I was trying to access a file created with one certificate with an app that was signed by another certificate. I cleaned up all the files and started fresh with new files created by the app I plan to post to market. Now I am able to access and move the files without the Android System complaining :)



回答3:

please try a rooted phone. this error is caused by users permissions root=uid0 you=uid -1 or -2