0

我正在使用 android studio,当我启动应用程序时它不起作用,并且在 android studio 上显示此问题:

        09-13 23:41:37.579    2228-2380/? A/SdkSpecific17﹕ null
        java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.google.android.location.os.real.SdkSpecific17.d(SourceFile:266)
        at ees.run(SourceFile:797)
        at java.lang.Thread.run(Thread.java:856)
        Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS
        at android.os.Parcel.readException(Parcel.java:1425)
        at android.os.Parcel.readException(Parcel.java:1379)
        at android.app.ActivityManagerProxy.getCurrentUser(ActivityManagerNative.java:3871)
        at android.app.ActivityManager.getCurrentUser(ActivityManager.java:1948)
        ... 5 more
        09-13 23:41:37.719    2228-2380/? A/SdkSpecific17﹕ null
        java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.google.android.location.os.real.SdkSpecific17.d(SourceFile:266)
        at efb.D(SourceFile:933)
        at dno.c(SourceFile:126)
        at dno.x_(SourceFile:149)
        at dnk.b(SourceFile:952)
        at dmr.b(SourceFile:331)
        at ees.run(SourceFile:798)
        at java.lang.Thread.run(Thread.java:856)
        Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS
        at android.os.Parcel.readException(Parcel.java:1425)
        at android.os.Parcel.readException(Parcel.java:1379)
        at android.app.ActivityManagerProxy.getCurrentUser(ActivityManagerNative.java:3871)
        at android.app.ActivityManager.getCurrentUser(ActivityManager.java:1948)
        ... 10 more

你能帮助我吗?谢谢

4

1 回答 1

1

线索是

Caused by: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=2228, uid=10011 requires android.permission.INTERACT_ACROSS_USERS

您需要添加到您的 manifest.xml

<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />

话虽这么说,我以前没有见过这个权限......我相信它在您需要root访问权限时使用。因此,您可能还需要一部已植根的手机。

于 2013-09-15T02:27:17.923 回答