Libgdx Android Crash Interact_across_users_full!

Whenever I want to run my application on android I get this exception:

Permission Denial: startActivity asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL

I have absolutely no clue why this happens and what I should do about it. I also tried to include this permission into the manifest but nothing happens.

Has someone already had the same problem and knows how I can solve this?

Is your device rooted?

EDIT: To build on that, if your device is rooted that can cause this problem, commonly when you are trying to check if said device is rooted in code. However here is a short explanation to why you can’t use that permission:

Stack Q

No my phone is not rooted(I checked it also with a rootchecker app). I can’t really see what I am doing wrong. I just export the apk from eclipse with an android key and load it onto the phone. From the link I can’t really figure out what I am doing wrong. How do you deploy to android?

Hmmm, perhaps a mismatch between eclipse and the phone? The IDE tries to start the app under one user but another user is logged in on the phone…?

I use AIDE not Eclipse however, so I am just apeculating.

It’s quite strange. I will try to use the app on another phone. It is quite hard to figure out what’s causing this. I am just using the normal libgdx setup with the universal tween engine but I will try to leave out some code to see when the error occurs.

Going by the error you get, leaving out code will make no difference. The error relates to an attempt to run the app with the wrong user.