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

当我尝试启动属于 Activity 组的myaccountactivity时,它适用于1.6以上的api,但如果我尝试在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)

我试图找出解决方案,但没有用。如果有人知道如何解决或知道其来临的原因,请告诉我。

谢谢

最佳答案

您使用的SDK版本超过了1.6,但您在 list 中声称您的应用可以在1.6上正常运行。将构建目标设置为1.6以查看哪些目标。

09-30 23:10