问题描述
您好我每次我试图打开活动时出现此错误
Hello I get this error every time I'm trying to open an activity
java.lang.VerifyError: com.karriapps.smartsiddur.Saharit
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
有人可以直接我一个解决方案或方法来检查哪里出了问题是来自谢谢
Can someone direct me to a solution or a way to check where the problem is coming fromthanks
推荐答案
由于CommonsWare提到的,的VerifyError意味着你要引用类的Dalvik是无法加载。
As CommonsWare mentioned, a VerifyError means that you're trying to reference a class that Dalvik isn't able to load.
这是可能的,这种类缺少。
It's possible that this class is missing.
这也有可能是你要使用的框架方法的API级别比什么设备上present,因此类被拒绝为无效。
It's also possible that you're trying to use framework methods for an API level greater than what's present on the device, and therefore the class is being rejected as invalid.
试试你的编译器的构建级别设置为API 7级,它对应到Android 2.1。 (不要忘了你的AndroidManfest.xml的targetSdkVersion设置为7的可能。)这将导致不存在募集编译器错误的任何框架调用。
Try setting your compiler's build level to API Level 7, which corresponds to Android 2.1. (Don't forget to set your AndroidManfest.xml's targetSdkVersion to "7" as well.) This will cause any framework calls that don't exist to raise a compiler error.
您可能也想看看上面的行/以下的堆栈跟踪您收到,看是否有从验证,说明为什么验证失败的任何其他信息。
You also might want to look at the lines above/below the stack trace you received to see if there's any additional information from the verifier indicating why verification failed.
这篇关于java.lang.VerifyError在Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!