如何解决java.lang.SecurityException:不再支持MODE_WORLD_READABLE

时间:2017-06-22 09:23:19

标签: java android android-studio

Log cat: 致命异议:主要                                                  处理:com.yourpackagename,PID:8102                                                  java.lang.RuntimeException:无法启动活动ComponentInfo {com.yourpackagename / com.yourpackagename.TestActivity}:java.lang.SecurityException:不再支持MODE_WORLD_READABLE                                                      在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)                                                      在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)                                                      在android.app.ActivityThread.-wrap12(ActivityThread.java)                                                      在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1477)                                                      在android.os.Handler.dispatchMessage(Handler.java:102)                                                      在android.os.Looper.loop(Looper.java:154)                                                      在android.app.ActivityThread.main(ActivityThread.java:6119)                                                      at java.lang.reflect.Method.invoke(Native Method)                                                      在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:886)                                                      在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)                                                   引起:java.lang.SecurityException:不再支持MODE_WORLD_READABLE                                                      在android.app.ContextImpl.checkMode(ContextImpl.java:2134)                                                      在android.app.ContextImpl.getSharedPreferences(ContextImpl.java:354)                                                      在android.app.ContextImpl.getSharedPreferences(ContextImpl.java:349)                                                      在android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:164)                                                      在com.basewin.utils.GlobalTransData.init(GlobalTransData.java:74)                                                      在com.basewin.services.ServiceManager.init(ServiceManager.java:70)                                                      在com.yourpackagename.TestActivity.onCreate(TestActivity.java:25)                                                      在android.app.Activity.performCreate(Activity.java:6679)                                                      在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)                                                      在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)                                                      在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)                                                      在android.app.ActivityThread.-wrap12(ActivityThread.java)                                                      在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1477)                                                      在android.os.Handler.dispatchMessage(Handler.java:102)                                                      在android.os.Looper.loop(Looper.java:154)                                                      在android.app.ActivityThread.main(ActivityThread.java:6119)                                                      at java.lang.reflect.Method.invoke(Native Method)                                                      在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:886)                                                      在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

0 个答案:

没有答案