I have just downloaded the Apollo music player source code from the official git repository, and I have imported the project into my Eclipse ADT. If I try to run the project in an emulator I get the following error:
07-04 19:39:08.948: E/AndroidRuntime(1072): FATAL EXCEPTION: main
07-04 19:39:08.948: E/AndroidRuntime(1072): Process: com.andrew.apollo, PID: 1072
07-04 19:39:08.948: E/AndroidRuntime(1072): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.andrew.apollo/com.andrew.apollo.ui.activities.HomeActivity}: java.lang.ClassNotFoundException: Didn't find class "com.andrew.apollo.ui.activities.HomeActivity" on path: DexPathList[[zip file "/data/app/com.andrew.apollo-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.andrew.apollo-1, /system/lib]]
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.os.Handler.dispatchMessage(Handler.java:102)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.os.Looper.loop(Looper.java:136)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread.main(ActivityThread.java:5017)
07-04 19:39:08.948: E/AndroidRuntime(1072): at java.lang.reflect.Method.invokeNative(Native Method)
07-04 19:39:08.948: E/AndroidRuntime(1072): at java.lang.reflect.Method.invoke(Method.java:515)
07-04 19:39:08.948: E/AndroidRuntime(1072): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-04 19:39:08.948: E/AndroidRuntime(1072): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-04 19:39:08.948: E/AndroidRuntime(1072): at dalvik.system.NativeStart.main(Native Method)
07-04 19:39:08.948: E/AndroidRuntime(1072): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.andrew.apollo.ui.activities.HomeActivity" on path: DexPathList[[zip file "/data/app/com.andrew.apollo-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.andrew.apollo-1, /system/lib]]
07-04 19:39:08.948: E/AndroidRuntime(1072): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
07-04 19:39:08.948: E/AndroidRuntime(1072): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
07-04 19:39:08.948: E/AndroidRuntime(1072): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
07-04 19:39:08.948: E/AndroidRuntime(1072): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
07-04 19:39:08.948: E/AndroidRuntime(1072): ... 11 more
I have tried cleaning a rebuliding the project, and running with different emulators with several API's, but the error persists. The AndroidManifest seems to be OK, it has the "package-name" set, and the main activity name starts with a dot ("."). Any hint will be welcomed.
It seems that the problem was that the android support library wasn't in the "libs" directory, it was in another directory. I have just created a "libs" directory in the root of the Apollo project, copy the jar file in there, then clean and rebuild, and now it works fine. Let me know if this work for you.