我在来宾登录下运行应用程序,应用程序在启动屏幕上崩溃。应用程序在正常登录
下运行正常我参考了这个链接,link2,但没有找到解决方案。
<<p> 崩溃报告/strong>java.lang.RuntimeException: Unable to start activity ComponentInfo {com.packagename.projectname/com.packagename.projectname.LancherActivity}: java.lang.IllegalArgumentException: Optimized data directory /storage/emulated/12/optimized is not owned by the current user. Shared storage cannot protect your application from code injection attacks.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.IllegalArgumentException: Optimized data directory /storage/emulated/12/optimized is not owned by the current user. Shared storage cannot protect your application from code injection attacks.
at dalvik.system.DexFile.<init>(DexFile.java:102)
at dalvik.system.DexFile.loadDex(DexFile.java:151)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:265)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:223)
at dalvik.system.DexPathList.<init>(DexPathList.java:109)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.DexClassLoader.<init>(DexClassLoader.java:57)
at DexLoader7.<clinit>(Unknown Source)
at com.packagename.projectname.LauncherActivity.ʾ$3bf1605b(:753)
at com.packagename.projectname.LauncherActivity.ʽ(:266)
at com.packagename.projectname.LauncherActivity.onCreate(:197)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
... 10
在com.packagename.projectname.LauncherActivity.ʾ$3bf1605b(:753)
行中使用Google Plus登录时导致的错误。
return new GoogleApiClient.Builder(SigninActivity.this).addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).addApi(Plus.API, Plus.PlusOptions.builder().build()).addScope(Plus
.SCOPE_PLUS_LOGIN).build();
进程是每个用户隔离的,除非另有说明,否则你不能访问其他用户的数据分区,如果它不是你当前的用户。
例如,0不能访问10,反之亦然。