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

前端 未结 5 939
遥遥无期
遥遥无期 2020-12-01 18:38

When I\'m trying to use android \'am\' command to start an activity ,it\'s wrong under 4.2 platform(I tried , it\'s ok under 2.3 version).The code is like this



        
5条回答
  •  温柔的废话
    2020-12-01 18:52

    1)In linux every user has an id number. 0 and -2 are User IDs (UIDs). 0 is root, -2 is some random user (which may not be a person, it may just be a fake account used for internal reasons).

    2)Any book on Linux. Android is just a graphical framework on top of Linux.

    3)Yes, just add the permission.

提交回复
热议问题