Android运行验证错误 [英] Android Runtime Verify Error

查看:120
本文介绍了Android运行验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目的是读取原始资源,它使用JSON转换成Java code。类和外部库做存储在不同的项目。当我运行我的应用程序我在日志猫得到这个错误:

My intention is to read a raw resource and convert it to Java code using JSON. The class and external libraries that do this are stored in a different project. When I run my app I get this error in the log cat:

06-08 13:51:34.680: WARN/dalvikvm(563): Unable to resolve superclass of 
Lnet/sf/json/JSONException; (297)
06-08 13:51:34.680: WARN/dalvikvm(563): Link of class 'Lnet/sf/json/JSONException;' failed
06-08 13:51:34.690: WARN/dalvikvm(563): VFY: unable to resolve exception class 186 (Lnet/sf/json/JSONException;)
06-08 13:51:34.690: WARN/dalvikvm(563): VFY: unable to find exception handler at addr 0x2e
06-08 13:51:34.690: WARN/dalvikvm(563): VFY:  rejected Lnet/sf/json/JSONSerializer;.toJSON (Ljava/lang/Object;Lnet/sf/json/JsonConfig;)Lnet/sf/json/JSON;
06-08 13:51:34.700: WARN/dalvikvm(563): VFY:  rejecting opcode 0x0d at 0x002e
06-08 13:51:34.700: WARN/dalvikvm(563): VFY:  rejected Lnet/sf/json/JSONSerializer;.toJSON (Ljava/lang/Object;Lnet/sf/json/JsonConfig;)Lnet/sf/json/JSON;
06-08 13:51:34.700: WARN/dalvikvm(563): Verifier rejected class Lnet/sf/json/JSONSerializer;
06-08 13:51:34.710: DEBUG/AndroidRuntime(563): Shutting down VM
06-08 13:51:34.710: WARN/dalvikvm(563): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
06-08 13:51:34.730: ERROR/AndroidRuntime(563): FATAL EXCEPTION: main
06-08 13:51:34.730: ERROR/AndroidRuntime(563): java.lang.VerifyError: net.sf.json.JSONSerializer
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at fliphouse.JSONUtils.setup(JSONUtils.java:67)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at ie.fliphouse.luas.LuasUtils.readJSON(LuasUtils.java:130)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at ie.fliphouse.luas.ZoneList.onCreate(ZoneList.java:51)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.os.Looper.loop(Looper.java:123)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at android.app.ActivityThread.main(ActivityThread.java:4627)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at java.lang.reflect.Method.invokeNative(Native Method)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at java.lang.reflect.Method.invoke(Method.java:521)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
06-08 13:51:34.730: ERROR/AndroidRuntime(563):     at dalvik.system.NativeStart.main(Native Method)
06-08 13:51:34.740: WARN/ActivityManager(59):   Force finishing activity ie.fliphouse.luas/.ZoneList

我可以告诉大家,错误是从创建一个JSONArray而产生的。我所遇到的这个错误已经对计算器,但有是如何解决这个没有明确的方法。任何人都可以推荐给我的方式来解决这个问题。帮助将不胜AP preciated。

I can tell that the error is arising from the creation of a JSONArray. I have come across this error already on stackoverflow but there was no clear way of how resolve this. Can anyone recommend to me a way to solve this problem. Help would be greatly appreciated.

推荐答案

您要添加的net.sf.json库似乎有一个未解决的依赖。尝试使用的Andr​​oid SDK JSON implementaton代替。

You are adding the net.sf.json library that seems to have a unresolved dependency. Try to use the Android SDK JSON implementaton instead.

这篇关于Android运行验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆