I am trying to create Android applications using Scala 2.9.1 and SBT 0.13 and Android-Plugin.
However, launching ProGuard can be very slow.
Thus, instead, when I have not been using any new classes / methods since the previous build, I just try to combine classes.dex with my own dexed android-app classes (e.g., MainActivity.scalaetc.).
The problem I get (on Android 4.0.x) is that the merge goes without any errors, but when I try to run the application, I get this one "Unfortunately, MyAndroidApp has stopped".
Here is the logcat log:
EmbeddedLogger E App crashed! Package: com.my.app v0 (0.1)
300 EmbeddedLogger E Application Label: MyAndroidApp
24137 AndroidRuntime E FATAL EXCEPTION: main
24137 AndroidRuntime E java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.my.app/com.my.app.MainActivity}: java.lang.ClassNotFoundException: com.my.app.MainActivity
24137 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2118)
24137 AndroidRuntime E at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2237)
24137 AndroidRuntime E at android.app.ActivityThread.access$600(ActivityThread.java:139)
24137 AndroidRuntime E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
24137 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99)
24137 AndroidRuntime E at android.os.Looper.loop(Looper.java:156)
24137 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:5005)
24137 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method)
24137 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:511)
24137 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
24137 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
24137 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method)
24137 AndroidRuntime E Caused by: java.lang.ClassNotFoundException: com.my.app.MainActivity
24137 AndroidRuntime E at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
24137 AndroidRuntime E at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
24137 AndroidRuntime E at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
24137 AndroidRuntime E at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
24137 AndroidRuntime E at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2109)
24137 AndroidRuntime E ... 11 more
300 ActivityManager W Force finishing activity com.my.app/.MainActivity
5864 OpenGLRenderer D Flushing caches (mode 1)
300 ViewRootImpl D @@@- disable SystemServer HW acceleration
I manually opened the generated apk and class.dex inside it, went through the packages and found MainActivity.
.