Я недавно обновился до Android 3.3, теперь многие зависимости изменены на AndroidX .Что приводит к сбою приложения, а также изменения зависимостей должны быть выполнены в XML .Я столкнулся с аналогичной проблемой с CoordinatorLayout.Я искал stackoverflow, на эту тему не так много Вопросов, поскольку AndroidX является относительно новым.Поэтому я почувствовал необходимость поднять вопрос по этому поводу.
Где я могу получить xml для плавающей кнопки действия аналогично для всех XML, есть веб-сайт, где мы можем получить XML для зависимостей androidX.
XML
Crash Logcat
android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class android.support.design.widget.FloatingActionButton
Caused by: android.view.InflateException: Binary XML file line #15: 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.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/base.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_dependencies_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_resources_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_0_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_1_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_2_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_3_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_4_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_5_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_6_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_7_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_8_apk.apk", zip file "/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.kc.unsplashdemo-kTZQS-p2845Xly7PcTuAmg==/lib/arm, /system/lib, /vendor/lib]]
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: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 com.kc.unsplashdemo.OneFragment.onCreateView(OneFragment.java:42)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2243)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:654)
at androidx.fragment.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:146)
зависимости
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':androidunsplash')
implementation 'com.squareup.picasso:picasso:2.71828'
implementation("com.squareup.okhttp3:okhttp:3.12.0")
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.1'
}