关于startactivity的android java.lang.VerifyError 1.6

时间:2010-11-23 07:06:53

标签: android

我实现了一个包含活动组mainActivity的项目。 此主要活动包含3个其他活动组。

当我尝试启动myaccountactivity这是一个活动组时,它适用于api超过1.6但是如果我试图在1.6上运行它我会得到以下的错误

11-23 12:22:15.005: ERROR/AndroidRuntime(412): java.lang.VerifyError: com.myproject.android.MyAccountActivity
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at java.lang.Class.newInstanceImpl(Native Method)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at java.lang.Class.newInstance(Class.java:1472)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:2242)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at com.myproject.android.myproject.showMyAccountAtivity(myproject.java:396)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at com.myproject.android.myproject.onActivityResult(myproject.java:456)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.Activity.dispatchActivityResult(Activity.java:3625)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityGroup.dispatchActivityResult(ActivityGroup.java:123)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.deliverResults(ActivityThread.java:3220)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.handleSendResult(ActivityThread.java:3266)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.access$2600(ActivityThread.java:116)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1823)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.os.Looper.loop(Looper.java:123)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at android.app.ActivityThread.main(ActivityThread.java:4203)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at java.lang.reflect.Method.invokeNative(Native Method)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at java.lang.reflect.Method.invoke(Method.java:521)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-23 12:22:15.005: ERROR/AndroidRuntime(412):     at dalvik.system.NativeStart.main(Native Method)

我试图解决问题,但没有用。如果任何人知道如何解决或知道它为什么会来,请告诉我..

由于

1 个答案:

答案 0 :(得分:5)

您正在使用1.6之前的SDK中的功能,但您在清单中声明您的应用在1.6上正常运行。将构建目标设置为1.6以查看哪些目标。