I'm trying to create a floating button in android studio on a Google map. The objective of the button is to update marks on the map, but when trying to inflate it gives me the following error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.kakao/com.example.kakao.MapsActivity}: android.view.InflateException: Binary XML file line #12: Binary XML file line #12: Error inflating class android.support.design.widget.FloatingActionButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3297)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3405)
at android.app.ActivityThread.-wrap12(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1994)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Caused by: android.view.InflateException: Binary XML file line #12: Binary XML file line #12: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.FloatingActionButton" on path: DexPathList[[zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/base.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_resources_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.kakao-OUJ-bqVa2zcpC7rS80Bifg==/lib/arm64, /system/lib64, /vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:801)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:874)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:835)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.kakao.MapsActivity.onCreate(MapsActivity.java:76)
at android.app.Activity.performCreate(Activity.java:7383)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3250)
The button in xml:
<android.support.design.widget.FloatingActionButton
android:id="#+id/my_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:src="#drawable/ic_alert_circle_white_36dp" />
The reference and inflated in java:
FloatingActionButton my_fab = (FloatingActionButton) findViewById(R.id.my_fab);
my_fab.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
Snackbar.make(view, "Tocaste el FAB", Snackbar.LENGTH_LONG).show();
}
});
My dependencies:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.material:material:1.0.0'
You should use app:srcCompat instead of android:src.
app:srcCompat="#drawable/ic_alert_circle_white_36dp"
The correct xml will be
<android.support.design.widget.FloatingActionButton
android:id="#+id/my_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
app:srcCompat="#drawable/ic_alert_circle_white_36dp" />
you are working with androidx library so the class you should using for FAB in your xml is :
com.google.android.material.floatingactionbutton.FloatingActionButton
instead of :
android.support.design.widget.FloatingActionButton
I've researched through the rest of the answers, but they all seem to suggest updating dependencies etc. However I'm developing for SDK 28, everything is up to date, and has been checked via Android Studio, so there would appear to be another cause.
Basically I have added a Floating Action Button via XML:
<android.support.design.widget.FloatingActionButton
android:id="#+id/dict_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="#drawable/ic_add_circle_black_24dp"
android:layout_margin="16dp" />
And get the below crash when I try to load the activity containing the FAB.
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.ac.aber.dcs.haa14.assignment, PID: 2876
java.lang.RuntimeException: Unable to start activity ComponentInfo{uk.ac.aber.dcs.haa14.assignment/uk.ac.aber.dcs.haa14.assignment.ui.DictionaryActivity}: android.view.InflateException: Binary XML file line #10: Binary XML file line #10: Error inflating class android.support.design.widget.FloatingActionButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: android.view.InflateException: Binary XML file line #10: Binary XML file line #10: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.FloatingActionButton" on path: DexPathList[[zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/base.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_dependencies_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_resources_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_0_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_1_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_2_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_3_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_4_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_5_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_6_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_7_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_8_apk.apk", zip file "/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:606)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at uk.ac.aber.dcs.haa14.assignment.ui.DictionaryActivity.onCreate(DictionaryActivity.java:32)
E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/uk.ac.aber.dcs.haa14.assignment-5Y5qp-mx6ITFeGrYdObqMQ==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:353)
at dalvik.system.DexFile.<init>(DexFile.java:100)
at dalvik.system.DexFile.<init>(DexFile.java:74)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:374)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:337)
at dalvik.system.DexPathList.<init>(DexPathList.java:157)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:65)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:69)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:35)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:693)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:727)
at android.app.LoadedApk.getResources(LoadedApk.java:954)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2270)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5639)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
... 6 more
Application terminated.
add implementation 'com.android.support:design:27.1.0' into app/build.gradle where all other dependencies are.
I know that this question is have asked many times and respective solution is on that portal, but none of them solve my problem.
I created an android project on android studio 3.0.1 and when I click on green symbol to run emulator, on AVD it shows me project has stopped--Open app again.
I saw the suggestion for this problem as Logcat and breakpoint and so on. But I don't know how actually use it.
I am new on android development so please help me how to use logcat or suggest me any other way to fix this problem my logcat is as follow:-
06-03 13:18:39.644 6812-6812/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ram.projects6b, PID: 6812
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ram.projects6b/com.example.ram.projects6b.MainActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.v7.widget.Fab
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
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)
Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.v7.widget.Fab
Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class android.support.v7.widget.Fab
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.Fab" on path: DexPathList[[zip file "/data/app/com.example.ram.projects6b-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.ram.projects6b-2/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:609)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:286)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.ram.projects6b.MainActivity.onCreate(MainActivity.java:17)
at android.app.Activity.performCreate(Activity.java:6679)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
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 problem describe with this error log:
android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.v7.widget.Fab
Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class android.support.v7.widget.Fab
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.Fab" on path: DexPathList[[zip file
You're using incorrect View tag in your layout. You're using:
android.support.v7.widget.Fab
where there is no Fab View in Support library.
Probably what you wanted is FloatingActionButton:
android.support.design.widget.FloatingActionButton
This question already has answers here:
java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist
(42 answers)
Closed 5 years ago.
I am new to AndroidStudio learning how to code via the Udacity program, "Android Basics". I am currently on Lesson 3.13 "Running Hello World App on Your Phone". I have followed the instructions step by step and have tried to launch the app on my phone (OnePlus5). However, as soon as I press the play button, the message "MyApp has stopped". It gives me the option to re-open the app but the message "Happy Birthday keeps stopping" appears.
02-10 12:45:08.376 7992-7992/com.example.android.happybirthday E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.happybirthday, PID: 7992
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.happybirthday/com.example.android.happybirthday.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.happybirthday.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2847)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.happybirthday.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newActivity(Instrumentation.java:1190)
02-10 12:45:08.377 7992-7992/com.example.android.happybirthday E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2837)
... 9 more
Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/AppCompatActivity;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
... 12 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.AppCompatActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 15 more
02-10 12:45:08.378 7992-7992/com.example.android.happybirthday E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.happybirthday, PID: 7992
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.android.happybirthday/com.example.android.happybirthday.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.android.happybirthday.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2847)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3046)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.android.happybirthday.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.Instrumentation.newActivity(Instrumentation.java:1190)
02-10 12:45:08.378 7992-7992/com.example.android.happybirthday E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2837)
... 9 more
Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/AppCompatActivity;
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
... 12 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.AppCompatActivity" on path: DexPathList[[zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/base.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.android.happybirthday-KxEHHSDZIiC4FI1vJwwPDw==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 15 more
02-10 12:45:08.379 7992-7992/com.example.android.happybirthday D/AppTracker: App Event: crash
Check the spelling of the class to see it's correct, check if the Activity is the correct package and if the Activity is declared in the manifest.
An user has this crash (it's the first time!). I can't understand why, it's crazy...
This user setup: Galaxy S6 Edge on Android 7.0
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mycompagny/com.mycompagny.ui.form.FormPreviewActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.mycompagny.ui.widget.IconView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
Caused by android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.mycompagny.ui.widget.IconView
Have you got some explanations guys?
Thank you very much!