08-15 21:05:44.338 7789-7789/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dom925.cadmon.tampa, PID: 7789
java.lang.RuntimeException: Unable to instantiate application com.dom925.cadmon.tampa.App: java.lang.ClassNotFoundException: Didn't find class "com.dom925.cadmon.tampa.App" on path: DexPathList[[zip file "/data/app/com.dom925.cadmon.tampa-1/base.apk"],nativeLibraryDirectories=[/data/app/com.dom925.cadmon.tampa-1/lib/x86, /system/lib, /vendor/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:802)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5377)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
The cause to this particular problem was some missing plugins in the Android app's build.gradle file. As I was adding some Kotlin code to the project, the Gradle build system needs to recognize the Kotlin classes. If the plugins are not included, the Gradle build system will not be able to run the Kotlin code.
The app's build.gradle file with missing Kotlin plugins |
So adding in the Kotlin plugins kotlin-android and/or kotlin-android-extension as shown below solved the problem.