3

I developed the project in Eclipse, then moved to IntelliJ IDEA CE 12, then moved back to the Eclipse. IDEA had converted it to eclipse project not correctly, so I imported project from existing source and added line

<nature>com.android.ide.eclipse.adt.AndroidNature</nature>

to the section. Ok, it compiles successfully, but generates a lot of strange errors for the classes written by me and then crashes.

LogCat output:

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.

It worked fine in IDEA and Eclipse before!

4

6 回答 6

4

我不知道您的项目发生了什么,但请在 Eclipse 中尝试:Project--> Clean--> YourProject

于 2012-11-01T10:51:27.150 回答
3

在 Eclipse 中清理并构建您的项目。如果启动器 Activity 使用其包名正确定义,请检查 Android Manifest 文件。

于 2012-11-06T04:41:27.907 回答
2

Its not a good idea to use it like this(manually) rather we can export projects from IntelliJ IDEA to Eclipse in simple steps.

please follow this standard document for the above.

http://www.jetbrains.com/idea/webhelp/exporting-intellij-idea-project-to-eclipse.html

hope this will help you.

于 2012-11-06T09:32:31.210 回答
2

如果您在项目中使用库,请尝试在构建路径中添加到库导出

于 2012-11-08T01:28:13.443 回答
1

如果您确实有旧的工作 eclipse 项目,则从 IntelliJ IDEA 项目复制/替换所有新代码和 jar 到它。请记住仅复制/替换代码和 jar,而不是 IntelliJ IDEA 特定的设置文件。

于 2012-11-08T09:01:38.717 回答
0

右键单击有问题的项目并选择属性。
选择适当的 Android 版本(1.1、1.5 或 1.5 与 google api)并说好。
再次右键单击项目并选择“Android工具>修复项目属性”
修复一次导入(如果需要)
刷新项目,您应该准备好无需任何手动编辑

希望这可以帮助。

于 2012-11-08T09:25:10.610 回答