Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/219.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java DexOpt:非法方法访问_Java_Android_Android 4.4 Kitkat_Dexopt_Android Runtime - Fatal编程技术网

Java DexOpt:非法方法访问

Java DexOpt:非法方法访问,java,android,android-4.4-kitkat,dexopt,android-runtime,Java,Android,Android 4.4 Kitkat,Dexopt,Android Runtime,我有一个基于位置的应用程序,直到昨天还运行得很好,但现在我在手机上运行它时,它的行为很奇怪 下面是我的日志,它显示了我以前从未见过或听到过的错误 07-07 14:17:25.548: D/ActivityThread(24383): handleBindApplication:com.example.loc_update 07-07 14:17:25.553: D/ActivityThread(24383): setTargetHeapUtilization:0.75 07-07 14:17:

我有一个基于位置的应用程序,直到昨天还运行得很好,但现在我在手机上运行它时,它的行为很奇怪

下面是我的日志,它显示了我以前从未见过或听到过的错误

07-07 14:17:25.548: D/ActivityThread(24383): handleBindApplication:com.example.loc_update
07-07 14:17:25.553: D/ActivityThread(24383): setTargetHeapUtilization:0.75
07-07 14:17:25.553: D/ActivityThread(24383): setTargetHeapMinFree:524288
07-07 14:17:25.573: I/dalvikvm(24383): DexOpt: illegal method access (call Landroid/content/res/TypedArray;.<init> (Landroid/content/res/Resources;[I[II)V from Landroid/content/res/XResources$XTypedArray;)
07-07 14:17:25.573: I/dalvikvm(24383): Could not find method android.content.res.TypedArray.<init>, referenced from method android.content.res.XResources$XTypedArray.<init>
07-07 14:17:25.573: W/dalvikvm(24383): VFY: unable to resolve direct method 82: Landroid/content/res/TypedArray;.<init> (Landroid/content/res/Resources;[I[II)V
07-07 14:17:25.573: D/dalvikvm(24383): VFY: replacing opcode 0x70 at 0x0002
07-07 14:17:25.683: W/dalvikvm(24383): threadid=1: thread exiting with uncaught exception (group=0x4162bce0)
07-07 14:17:25.688: E/AndroidRuntime(24383): FATAL EXCEPTION: main
07-07 14:17:25.688: E/AndroidRuntime(24383): Process: com.example.loc_update, PID: 24383
07-07 14:17:25.688: E/AndroidRuntime(24383): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.loc_update/com.example.loc_update.MainActivity}: java.lang.NullPointerException
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2277)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread.access$800(ActivityThread.java:144)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.os.Handler.dispatchMessage(Handler.java:102)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.os.Looper.loop(Looper.java:136)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread.main(ActivityThread.java:5152)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at java.lang.reflect.Method.invokeNative(Native Method)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at java.lang.reflect.Method.invoke(Method.java:515)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at dalvik.system.NativeStart.main(Native Method)
07-07 14:17:25.688: E/AndroidRuntime(24383): Caused by: java.lang.NullPointerException
07-07 14:17:25.688: E/AndroidRuntime(24383):    at com.example.loc_update.MainActivity.onCreate(MainActivity.java:107)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.Activity.performCreate(Activity.java:6020)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-07 14:17:25.688: E/AndroidRuntime(24383):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2182)
07-07 14:17:25.688: E/AndroidRuntime(24383):    ... 12 more
07-07 14:17:25.548:D/ActivityThread(24383):handleBindApplication:com.example.loc\u更新
07-07 14:17:25.553:D/ActivityThread(24383):设置目标应用程序利用率:0.75
07-07 14:17:25.553:D/ActivityThread(24383):设置目标APMINFree:524288
I/dalvikvm(24383):DexOpt:非法方法访问(调用Landroid/content/res/TypedArray;(Landroid/content/res/Resources;[I[II)V from Landroid/content/res/XResources$XTypedArray;)
07-07 14:17:25.573:I/dalvikvm(24383):找不到方法android.content.res.TypedArray.,引用自方法android.content.res.XResources$XTypedArray。
07-07 14:17:25.573:W/dalvikvm(24383):VFY:无法解析直接方法82:Landroid/content/res/TypedArray;(Landroid/content/res/Resources;[I[II)V
07-07 14:17:25.573:D/dalvikvm(24383):VFY:在0x0002处替换操作码0x70
07-07 14:17:25.683:W/dalvikvm(24383):threadid=1:线程以未捕获异常退出(组=0x4162bce0)
07-07 14:17:25.688:E/AndroidRuntime(24383):致命异常:主
07-07 14:17:25.688:E/AndroidRuntime(24383):进程:com.example.locu更新,PID:24383
07-07 14:17:25.688:E/AndroidRuntime(24383):java.lang.RuntimeException:无法启动活动组件信息{com.example.loc_update/com.example.loc_update.MainActivity}:java.lang.NullPointerException
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2228)
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2277)
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.ActivityThread.access$800(ActivityThread.java:144)
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.os.Handler.dispatchMessage(Handler.java:102)上
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.os.Looper.loop(Looper.java:136)上
07-07 14:17:25.688:E/AndroidRuntime(24383):位于android.app.ActivityThread.main(ActivityThread.java:5152)
07-07 14:17:25.688:E/AndroidRuntime(24383):位于java.lang.reflect.Method.Invokenactive(本机方法)
07-07 14:17:25.688:E/AndroidRuntime(24383):位于java.lang.reflect.Method.invoke(Method.java:515)
07-07 14:17:25.688:E/AndroidRuntime(24383):在com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
07-07 14:17:25.688:E/AndroidRuntime(24383):位于com.android.internal.os.ZygoteInit.main(ZygoteInit.java:611)
07-07 14:17:25.688:E/AndroidRuntime(24383):位于de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
07-07 14:17:25.688:E/AndroidRuntime(24383):在dalvik.system.NativeStart.main(本机方法)
07-07 14:17:25.688:E/AndroidRuntime(24383):由以下原因引起:java.lang.NullPointerException
07-07 14:17:25.688:E/AndroidRuntime(24383):在com.example.loc_update.MainActivity.onCreate(MainActivity.java:107)
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.Activity.performCreate(Activity.java:6020)上
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)上
07-07 14:17:25.688:E/AndroidRuntime(24383):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2182)
2007-07 14:17:25.688:E/AndroidRuntime(24383):…还有12个

注意:我昨天安装了android 4.4.4自定义rom。是因为这个原因吗?

除非你是应用程序的开发人员并试图更正代码,否则你在错误的网站上。如果你是应用程序的开发人员,最好包含触发异常的代码。我也有同样的错误
DexOpt:invalign method access(调用Landroid/content/res/TypedArray;
,我的新应用程序工作得很好,我添加了一个设置功能,突然,砰!我的整个应用程序背景变为空白,我收到了“null”异常消息,等等。你有没有想过?!@Matt我必须对UI元素(例如TextView、Button等)进行初始化它工作得很好。你在添加设置菜单项吗?@Vinay,我终于解决了我的问题。似乎我无意中在onCreate方法中注释了setContentView(或者可能是在主活动中),但无论如何,经过大约2或3个小时的研究/调试,我终于发现了问题。(创建了一个虚拟活动,并将片段复制到其中,直到它停止工作——然后我意识到了我的问题)