1

Briefly, I am a student learning JAVA/Android development. While following the course, an error keeps on coming up but I can't seem to find the issue.

keep getting this error:

05-04 12:50:18.569 6836-6836/com.lucianvibez.flashchatnewfirebase E/AndroidRuntime: FATAL EXCEPTION: main Process: com.lucianvibez.flashchatnewfirebase, PID: 6836 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.lucianvibez.flashchatnewfirebase/com.online.lucianvibez.flashchatnewfirebase.LoginActivity}: java.lang.ClassNotFoundException: Didn't find class "com.online.lucianvibez.flashchatnewfirebase.LoginActivity" on path: DexPathList[[zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/base.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.lucianvibez.flashchatnewfirebase-1/lib/x86, /system/lib, /vendor/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2548) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.online.lucianvibez.flashchatnewfirebase.LoginActivity" on path: DexPathList[[zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/base.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.lucianvibez.flashchatnewfirebase-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.lucianvibez.flashchatnewfirebase-1/lib/x86, /system/lib, /vendor/lib]] 

This is the app module build.gradle file below:

apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.lucianvibez.flashchatnewfirebase" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) testImplementation 'junit:junit:4.12' implementation 'com.android.support:appcompat-v7:27.0.2' implementation 'com.android.support:design:27.0.2' implementation 'com.google.firebase:firebase-core:15.0.0' implementation 'com.google.firebase:firebase-database:15.0.1' implementation 'com.google.firebase:firebase-auth:15.1.0' } apply plugin: 'com.google.gms.google-services' 
4
  • please show your manifest of the app or it would really help if you could also post your App Module based Build.gradle details too. Commented May 5, 2018 at 0:03
  • This is usually because of misconfiguration of multidex. Please add your build.gradle to your question. Commented May 5, 2018 at 5:05
  • Ok,,I added the build.gradle Commented May 5, 2018 at 11:57
  • any help please? Commented May 7, 2018 at 12:59

1 Answer 1

1

with minSdkVersion 16 you need to manually enable multidex support.

this only became the default with API level 21.

android { defaultConfig { applicationId "com.lucianvibez.flashchatnewfirebase" minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" multiDexEnabled true } ... } 

and the dependency, since the minSdkVersion is < 21:

dependencies { implementation "com.android.support:multidex:1.0.3" } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.