I tried to keep a game project quite platform independent so I split it up into three projects from low-level to top android specific level like that: engine, game, android game.
The involved classes/interfaces in the error are those:
(low level) engine project defines this interface:
com.myteam.engine.IGame
(mid level) platform independent game project defines those classes:
com.myteam.myproject.Game com.myteam.myproject.MyProject (derived from com.myteam.myproject.Game)
(top level) android project implements activity, etc.:
com.myteam.myproject.android.MyAndroidActivity (using com.myteam.myproject.MyProject)
All compiles well and runs perfectly under Windows (with another Windows project on level 3 using the first two).
But when running with ADT it fails at run-time when the Activity starts. The Android app basically just displays a call stack with a "NoClassDefFoundError com.myteam.myproject.MyProject" exception.
The exception seems to be caused by its super class (or the super class' interface) while loading/resolving as the LogCat output reveals:
12-20 19:51:51.897: D/ddm-heap(218): Got feature list request
12-20 19:51:52.207: I/dalvikvm(218): Failed resolving Lcom/myteam/myproject/Game; interface 18 'Lcom/myteam/engine/IGame;'
12-20 19:51:52.217: W/dalvikvm(218): Link of class 'Lcom/myteam/myproject/Game;' failed
12-20 19:51:52.227: W/dalvikvm(218): Unable to resolve superclass of Lcom/myteam/myproject/MyProject; (52)
12-20 19:51:52.227: W/dalvikvm(218): Link of class 'Lcom/myteam/myproject/MyProject;' failed
12-20 19:51:52.227: E/dalvikvm(218): Could not find class 'com.myteam.myproject.MyProject', referenced from method com.myteam.myproject.android.MyAndroidActivity.onCreate
12-20 19:51:52.227: W/dalvikvm(218): VFY: unable to resolve new-instance 54 (Lcom/myteam/myproject/MyProject;) in Lcom/myteam/myproject/android/Youcode_AndroidActivity;
12-20 19:51:52.227: D/dalvikvm(218): VFY: replacing opcode 0x22 at 0x0008
12-20 19:51:52.227: D/dalvikvm(218): Making a copy of Lcom/myteam/myproject/android/Youcode_AndroidActivity;.onCreate code (88 bytes)
I tried adding the two first projects under the "Build Path / Order and Export" Eclipse project settings of the android game project as described in other posts and forums but it doesn't change a thing.
My hunch is that the Manifest or Project settings need another mentioning of the package/class dependencies for apk packaging or run-time. Any ideas?