我在Eclipse中開發了該項目,然後移至IntelliJ IDEA CE 12,然後移回到Eclipse。 IDEA已將其轉換爲eclipse項目不正確,因此我從現有源導入項目並添加了行我自己的類中的ClassDefNotFoundError
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
到該部分。好吧,它編譯成功,但爲我寫的類生成很多奇怪的錯誤,然後崩潰。
logcat的輸出:
E/dalvikvm(9673): Could not find class 'com.capsule.launcher.views.Screen', referenced from method com.capsule.launcher.views.Workspace$1.onPageSelected
W/dalvikvm(9673): VFY: unable to resolve check-cast 458 (Lcom/capsule/launcher/views/Screen;) in Lcom/capsule/launcher/views/Workspace$1;
D/dalvikvm(9673): VFY: replacing opcode 0x1f at 0x0010
W/dalvikvm(9673): Unable to resolve superclass of Lcom/capsule/launcher/views/CellLayout; (346)
W/dalvikvm(9673): Link of class 'Lcom/capsule/launcher/views/CellLayout;' failed
W/dalvikvm(9673): Unable to resolve superclass of Lcom/capsule/launcher/views/DockBar; (455)
W/dalvikvm(9673): Link of class 'Lcom/capsule/launcher/views/DockBar;' failed
W/dalvikvm(9673): VFY: unable to find class referenced in signature (Lcom/capsule/launcher/views/DockBar;)
W/dalvikvm(9673): Unable to resolve superclass of Lcom/capsule/launcher/views/CellLayout; (346)
W/dalvikvm(9673): Link of class 'Lcom/capsule/launcher/views/CellLayout;' failed
W/dalvikvm(9673): Unable to resolve superclass of Lcom/capsule/launcher/views/DockBar; (455)
W/dalvikvm(9673): Link of class 'Lcom/capsule/launcher/views/DockBar;' failed
E/dalvikvm(9673): Could not find class 'com.capsule.launcher.views.DockBar', referenced from method com.capsule.launcher.views.WorkspaceHolder.onLayout
W/dalvikvm(9673): VFY: unable to resolve instanceof 456 (Lcom/capsule/launcher/views/DockBar;) in Lcom/capsule/launcher/views/WorkspaceHolder;
D/dalvikvm(9673): VFY: replacing opcode 0x20 at 0x001b
D/AndroidRuntime(9673): Shutting down VM
W/dalvikvm(9673): threadid=1: thread exiting with uncaught exception (group=0x40d6e300)
E/AndroidRuntime(9673): FATAL EXCEPTION: main
E/AndroidRuntime(9673): java.lang.NoClassDefFoundError: com.capsule.launcher.views.DockBar
E/AndroidRuntime(9673): at com.capsule.launcher.LauncherActivity.createWorkspace(LauncherActivity.java:116)
E/AndroidRuntime(9673): at com.capsule.launcher.LauncherActivity.onCreate(LauncherActivity.java:58)
E/AndroidRuntime(9673): at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime(9673): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime(9673): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime(9673): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime(9673): at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime(9673): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime(9673): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(9673): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(9673): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(9673): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(9673): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(9673): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(9673): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(9673): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 301): Force finishing activity com.capsule.launcher/.LauncherActivity
D/dalvikvm(9673): GC_CONCURRENT freed 4207K, 20% free 19381K/23943K, paused 13ms+4ms, total 52ms
W/ActivityManager( 301): Activity pause timeout for ActivityRecord{418f0cd0 com.capsule.launcher/.LauncherActivity}
D/dalvikvm( 301): GC_CONCURRENT freed 1886K, 28% free 22076K/30279K, paused 4ms+9ms, total 99ms
W/ActivityManager( 301): Activity destroy timeout for ActivityRecord{418f0cd0 com.capsule.launcher/.LauncherActivity}
D/Finsky (7843): [1] 5.onFinished: Installation state replication succeeded.
它之前IDEA和Eclipse工作得很好!