New app which Use AndroidX artifacts crash - android

When creating new app and checking the Use Android X artifacts without modifying anything the app crash bout on my phone and the emulator.
I have asked my friend to repeat method of creating the app and every thing work in his phone.
It is my first time using Android X, Am I doing something wrong? I am running Android Studio 3.3.0.20 in snap (Linux).
2019-02-08 17:54:44.477 5487-5487/worshifter.com.myapplication E/AndroidRuntime: FATAL EXCEPTION: main
Process: worshifter.com.myapplication, PID: 5487
java.lang.RuntimeException: Unable to start activity ComponentInfo{worshifter.com.myapplication/worshifter.com.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:647)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
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 worshifter.com.myapplication.MainActivity.onCreate(MainActivity.java:12)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/constraintlayout/widget/R$styleable;
at androidx.constraintlayout.widget.ConstraintLayout.init(ConstraintLayout.java:590)
at androidx.constraintlayout.widget.ConstraintLayout.<init>(ConstraintLayout.java:567)
at java.lang.reflect.Constructor.newInstance0(Native Method) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:343) 
at android.view.LayoutInflater.createView(LayoutInflater.java:647) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
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 worshifter.com.myapplication.MainActivity.onCreate(MainActivity.java:12) 
at android.app.Activity.performCreate(Activity.java:7136) 
at android.app.Activity.performCreate(Activity.java:7127) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
2019-02-08 17:54:44.478 5487-5487/worshifter.com.myapplication E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.constraintlayout.widget.R$styleable" on path: DexPathList[[zip file "/data/app/worshifter.com.myapplication-gnuqp7fLCQHjhJ5ZKGKRAQ==/base.apk"],nativeLibraryDirectories=[/data/app/worshifter.com.myapplication-gnuqp7fLCQHjhJ5ZKGKRAQ==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 28 more
Edit found out that when removing android.enableJetifier=true the app works.

I have the same issue.
As you see it show in logs: Error inflating class androidx.constraintlayout.widget.ConstraintLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
You should go to project level build.gradle and update ConstraintLayout to the latest version (and also the good idea update all other dependencies from beta versions):
Default dependencies:
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.core:core-ktx:1.1.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
Actual version:
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
Also I created bugreport about this issue:
https://issuetracker.google.com/issues/122892917

The solution is as simple as upgrading the libraries to their latest version in the build.gradle file.
Hint: Use the Android Studio's linting feature to update the libraries to their latest version (Left Alt+Enter on Windows)

I got same error,
My release apk can install to Emulator, Device,
But it crashed.
I check build.gradle file, updated to library to latest version.
Also remove deprecated library, error library, as image in below.
Then, my release apk never got crash when start application as before.

Related

Emulator keeps crashing when running

Hi i am trying to make an app which shows the location of a place and everytime i run my app on the android emulator and every-time time i run it keeps on crashing and it is displaying this message in the log cat down below. I am running android studio version 3.4.2. I would appreciate it if someone could help me with this problem.
The libary i loaded in was : implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:8.0.0'
2020-03-27 16:22:33.335 12756-12756/com.example.mappingexample E/SoLoader: couldn't find DSO to load: libmapbox-gl.so caused by: dlopen failed: "/data/data/com.example.mappingexample/lib-main/libmapbox-gl.so" has unexpected e_machine: 40 (EM_ARM)
2020-03-27 16:22:33.340 12756-12756/com.example.mappingexample E/Mbgl-LibraryLoader: Failed to load native shared library.
com.facebook.soloader.SoLoader$WrongAbiError: APK was built for a different platform
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:645)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
at com.mapbox.mapboxsdk.module.loader.LibraryLoaderProviderImpl$SoLibraryLoader.load(LibraryLoaderProviderImpl.java:42)
at com.mapbox.mapboxsdk.LibraryLoader.load(LibraryLoader.java:43)
at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<clinit>(NativeConnectivityListener.java:13)
at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43)
at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:67)
at com.example.mappingexample.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libmapbox-gl.so caused by: dlopen failed: "/data/data/com.example.mappingexample/lib-main/libmapbox-gl.so" has unexpected e_machine: 40 (EM_ARM)
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) 
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525) 
at com.mapbox.mapboxsdk.module.loader.LibraryLoaderProviderImpl$SoLibraryLoader.load(LibraryLoaderProviderImpl.java:42) 
at com.mapbox.mapboxsdk.LibraryLoader.load(LibraryLoader.java:43) 
at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<clinit>(NativeConnectivityListener.java:13) 
at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43) 
at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:67) 
at com.example.mappingexample.MainActivity.onCreate(MainActivity.java:40) 
at android.app.Activity.performCreate(Activity.java:7136) 
at android.app.Activity.performCreate(Activity.java:7127) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
2020-03-27 16:22:33.344 12756-12756/com.example.mappingexample E/.mappingexampl: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)
2020-03-27 16:22:33.344 12756-12756/com.example.mappingexample D/AndroidRuntime: Shutting down VM
2020-03-27 16:22:33.345 12756-12756/com.example.mappingexample E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.mappingexample, PID: 12756
java.lang.UnsatisfiedLinkError: No implementation found for void com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize() (tried Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize and Java_com_mapbox_mapboxsdk_net_NativeConnectivityListener_initialize__)
at com.mapbox.mapboxsdk.net.NativeConnectivityListener.initialize(Native Method)
at com.mapbox.mapboxsdk.net.NativeConnectivityListener.<init>(NativeConnectivityListener.java:27)
at com.mapbox.mapboxsdk.net.ConnectivityReceiver.instance(ConnectivityReceiver.java:43)
at com.mapbox.mapboxsdk.Mapbox.getInstance(Mapbox.java:67)
at com.example.mappingexample.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-03-27 16:22:33.360 12756-12756/com.example.mappingexample I/Process: Sending signal. PID: 12756 SIG: 9
You can resolve this issue by following these steps:
1. Go to Gradle (Module: App)
2. Add this code on android {}
android {
packagingOptions {
pickFirst '**/armeabi-v7a/libmapbox-gl.so'
pickFirst '**/x86/libmapbox-gl.so'
pickFirst '**/arm64-v8a/libmapbox-gl.so'
pickFirst '**/x86_64/libmapbox-gl.so'
pickFirst '**/x86/libmapbox-gl.so'
}
}

My app keep closing in the emulator after migrate to androidx. Does anyone have solution for this?

I just migrated to androidx. For some reason, my app keeps crashing whenever I use it in the emulator. I need help
I have been searching on the Internet for hours but have not seen any solution for that. I also examine my logcat but I do not get the error
2019-10-16 18:33:11.287 7763-7763/com.example.recyclerview E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.recyclerview, PID: 7763
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.recyclerview/com.example.recyclerview.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.core.widget.DrawerLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.core.widget.DrawerLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.core.widget.DrawerLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.core.widget.DrawerLayout" on path: DexPathList[[zip file "/data/app/com.example.recyclerview-gS5TXhudi0GJX8tyIujcvA==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.recyclerview-gS5TXhudi0GJX8tyIujcvA==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
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.inflate(LayoutInflater.java:492)
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.recyclerview.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
In the activity java and xml file with drawer layout replace androidx.core.widget.DrawerLayou with androidx.drawerlayout.widget.DrawerLayout. If you can't see it directly, use find option and search the string directly.
try to change androidx.core.widget.DrawerLayout with androidx.drawerlayout.widget.DrawerLayout
Your error message says your layout used in com.example.recyclerview.MainActivity.onCreate contains the class androidx.core.widget.DrawerLayout, but the package name for DrawerLayout is androidx.drawerlayout.widget.DrawerLayout. Correct your layout to use the right class name.

Error inflating SlidingPaneLayout class in AndroidX

Problem :
Hey everyone, I have a straightforward issue.
I have used androidx.slidingpanelayout.widget.SlidingPaneLayout in AndroidX before, and it worked perfectly fine.
But now, in my another application, Android-Studio is giving me an error which basically says it is having problems inflating SlidingPaneLayout class.
What I did :
I have checked every dependency and also compared it with my previous app that uses this.
I rebuilt my project many many times and also cleaned it (Build > Clean Project).
I used previous versions of material-design dependency and compiled my project with them, but nothing changed.
The dependencies I've used :
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0-alpha10'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
Note that I've also tried to switch back to alpha09 which I used in my other app, but here it did nothing.
Error :
I have simply copied and pasted the whole error below.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: afm.scheduler, PID: 5241
java.lang.RuntimeException: Unable to start activity ComponentInfo{afm.scheduler/afm.scheduler.ChatActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.slidingpanelayout.widget.SlidingPaneLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.slidingpanelayout.widget.SlidingPaneLayout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class androidx.slidingpanelayout.widget.SlidingPaneLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.slidingpanelayout.widget.SlidingPaneLayout" on path: DexPathList[[zip file "/data/app/afm.scheduler-pdmC1V-CHlc9Wtgy6E_N0A==/base.apk"],nativeLibraryDirectories=[/data/app/afm.scheduler-pdmC1V-CHlc9Wtgy6E_N0A==/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:171)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:610)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734)
at android.view.LayoutInflater.inflate(LayoutInflater.java:496)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at afm.scheduler.ChatActivity.onCreate(ChatActivity.java:36)
at android.app.Activity.performCreate(Activity.java:7224)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
I/afm.scheduler: ProcessProfilingInfo new_methods=0 is saved saved_to_disk=0 resolve_classes_delay=8000
Process 5241 terminated.
Goal :
I just want be able to use SlidingPaneLayout in my existing AndroidX application.
Just adding "implementation 'androidx.slidingpanelayout:slidingpanelayout:1.1.0'" in your build.gradle file.

java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/coroutines/experimental/CompletableDeferredKt

My app was working fine until I added kotlin coroutines as instructed here . When I click a floating button to open another activity from this lib I get this error. With coroutines removed app works fine.
I have already tried a number of solutions such as:
Disabling instant run.
Clean and Rebuild
Adding minifyEnabled false to debug buildType.
Adding multiDex
But none worked.
android {
compileSdkVersion 28
defaultConfig {
...
minSdkVersion 17
targetSdkVersion 28
multiDexEnabled true
...
}
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'
implementation "org.jetbrains.anko:anko:$anko_version"
implementation "org.jetbrains.anko:anko-design:$anko_version"
implementation 'com.fxn769:pix:1.2.5'
implementation 'com.android.support:multidex:1.0.3'
....
}
Traces
2019-02-18 10:01:10.097 9523-9523/com.APPIDHERE E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.APPIDHERE, PID: 9523
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/coroutines/experimental/CompletableDeferredKt;
at io.fotoapparat.hardware.CameraDevice.<init>(CameraDevice.kt:48)
at io.fotoapparat.hardware.Device.<init>(Device.kt:39)
at io.fotoapparat.hardware.Device.<init>(Device.kt:34)
at io.fotoapparat.Fotoapparat.<init>(Fotoapparat.kt:55)
at io.fotoapparat.Fotoapparat.<init>(Fotoapparat.kt:48)
at io.fotoapparat.FotoapparatBuilder.buildInternal(FotoapparatBuilder.kt:190)
at io.fotoapparat.FotoapparatBuilder.build(FotoapparatBuilder.kt:179)
at com.fxn.pix.Pix.initialize(Pix.java:373)
at com.fxn.pix.Pix.onCreate(Pix.java:325)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.coroutines.experimental.CompletableDeferredKt" on path: DexPathList[[zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/base.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_resources_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at io.fotoapparat.hardware.CameraDevice.<init>(CameraDevice.kt:48) 
at io.fotoapparat.hardware.Device.<init>(Device.kt:39) 
at io.fotoapparat.hardware.Device.<init>(Device.kt:34) 
at io.fotoapparat.Fotoapparat.<init>(Fotoapparat.kt:55) 
at io.fotoapparat.Fotoapparat.<init>(Fotoapparat.kt:48) 
at io.fotoapparat.FotoapparatBuilder.buildInternal(FotoapparatBuilder.kt:190) 
at io.fotoapparat.FotoapparatBuilder.build(FotoapparatBuilder.kt:179) 
at com.fxn.pix.Pix.initialize(Pix.java:373) 
at com.fxn.pix.Pix.onCreate(Pix.java:325) 
at android.app.Activity.performCreate(Activity.java:7136) 
at android.app.Activity.performCreate(Activity.java:7127) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:193) 
at android.app.ActivityThread.main(ActivityThread.java:6669) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.APPIDHERE-EfujhYqtoKYpsUMLZOt1TQ==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
2019-02-18 10:01:10.097 9523-9523/com.APPIDHERE E/AndroidRuntime: 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:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
... 6 more
The experimental coroutines are used in an old version of the Fotoapparat that PixImagePicker depends on. See here
Though Fotoapparat has updated so it's not using these anymore, and PixImagePicker seems to be using the latest version of Fotoapparat too.
Maybe raise issues with them on Github.
Fotoapparat
PixImagePicker

Android Studio: Error inflating class android.support.design.widget.FloatingActionButton

Today I tried to initialize "ChatSDK" and had a few problems. Now, if I want to start my app it is crashing all time. I found this problem:
E/androidRuntime: FATAL EXEPTION: main Process: com.inspredunity.gm.germanminelife, PID: 2605
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.inspredunity.gm.germanminelife/com.inspredunity.gm.germanminelife.MainActivity}: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.design.widget.FloatingActionButton
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.view.InflateException: Binary XML file line #20: Binary XML file line #20: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class android.support.design.widget.FloatingActionButton
E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.FloatingActionButton" on path: DexPathList[[zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/base.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_dependencies_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_resources_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_0_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_1_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_2_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_3_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_4_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_5_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_6_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_7_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_8_apk.apk", zip file "/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/base.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_resources_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
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 androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
E/AndroidRuntime: at com.inspredunity.gm.germanminelife.MainActivity.onCreate(MainActivity.java:37)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.inspredunity.gm.germanminelife-EdgnsjPOMDBCjzzyKZd6KA==/split_lib_resources_apk.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:354)
at dalvik.system.DexFile.<init>(DexFile.java:101)
at dalvik.system.DexFile.<init>(DexFile.java:75)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
at dalvik.system.DexPathList.<init>(DexPathList.java:164)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
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:74)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
Here are my Gradle 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.firebase:firebase-messaging:17.3.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplemenstation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.0.4'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.android.support:design:28.0.0'
implementation 'co.chatsdk.chatsdk:chat-sdk-core:4.4.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-ui:4.4.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-adapter:4.4.8'
implementation 'co.chatsdk.chatsdk:chat-sdk-firebase-file-storage:4.4.8'
implementation 'com.android.support:recyclerview-v7:28.0.0'
I tired every fix suggestion which I found at the internet but nothing worked. I hope you guys can help me.
If you need my MainActivity or my gradle file(s) please say it!
Thank you in advance!
FIXED
For any person still having this problem after febuary 2019, if you are using androidx or the new material libraries, This problem is happening because Google changed the naming format of the libraries using androidx.. you can check this official mapping https://developer.android.com/jetpack/androidx/migrate/artifact-mappings
and search for your library to see what the new name is, now that Google is in androidx
In your case, your library "android.support.design.widget.FloatingActionButton" in your xml file, is now called as using com.google.android.material.floatingactionbutton.FloatingActionButton
Android Support Library is no longer maintained. It is therefore recommended to use AndroidX Library instead.
FloatingActionButton using AndroidX:
1. Add in gradle:
implementation 'com.google.android.material:material:1.1.0'
2. Add in your layout:
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="#+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:src="#drawable/share_button"
android:layout_margin="16dp" />
Did you add android support library to your project? If not try this one :
implementation "com.android.support:design:28.0.0"
For more details about how to setup support library, you can check this
https://developer.android.com/topic/libraries/support-library/setup
Add this into your gradle :
implementation com.android.support:design:28.0.0

Categories

Resources