E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.nnroh.debtmanager, PID: 23433
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.nnroh.debtmanager/com.example.nnroh.debtmanager.AddPersonActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class layout
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 #2: Binary XML file line #2: Error inflating class layout
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class layout
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.layout" on path: DexPathList[[zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/base.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_resources_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/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.onCreateView(LayoutInflater.java:703)
at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:68)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788)
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 android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
at com.example.nnroh.debtmanager.AddPersonActivity.onCreate(AddPersonActivity.java:39)
at android.app.Activity.performCreate(Activity.java:7009)
at android.app.Activity.performCreate(Activity.java:7000)
E/AndroidRuntime: 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/com.example.nnroh.debtmanager-eZJs9JyPFQcK5hHTFcCewQ==/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
Below I'm listing possible solutions,
try this steps one by one:
1 Delete app on device and Clean Project
2 Disable minifyEnabled in debug mode
go to build.gradle(Module: app) in debug block and disable minifyEnabled:
buildTypes {
debug {
minifyEnabled false
}
}
3 Setting dataBinding to true in application's gradle file
In my case, I was including another layout
<include layout="#layout/attached_layout" />
to my activity's layout and this solved it.
android {
...
...
...
dataBinding {
enabled = true
}
}
4 Check the relative path of your activities in manifest
eg:
<activity android:name="com.pathToClass.MyActivity"
5 Check the package names in your custom views
<com.pathToClass.MyCustomView
android:id="#+id/myview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" />
6 Try disabling pre-dexing in the app build.gradle:
dexOptions {
preDexLibraries false
}
7 Disable Instant Run
Go to File -> Settings -> Build,Execution, Deployment -> Instant Run -> Uncheck the checkbox for instant run
8 Try MultiDexApplication
Add this to build.gradle(Module:app)
android {
defaultConfig {
...
multiDexEnabled true
}
dependencies {
...
implementation 'androidx.multidex:multidex:2.0.1'
}
}
if you are using application class you have to extend it with MultiDexApplication instead of Application and add it to AndroidManifest.xml
<application
android:name="com.myPackageName.MyApplication"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name">
else add MultiDexApplication class path from library as name
<application
android:name="androidx.multidex.MultiDexApplication"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name">
9 Proguard obfuscation
Looks like the class is loaded by reflection, but your proguard file doesn't prevent that class from being obfuscated
Reference : http://www.tousu.in/qa/?qa=1116606/android-no-original-dex-files-found-for-dex-location
try using this code in the manifest.xml inside the application tag.
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Related
I got this logcat error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.grayce.ttt/com.example.grayce.ttt.Home}: android.view.InflateException: Binary XML file line #16: Could not inflate Behavior subclass android.support.design.widget.Menu
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
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:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
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 #16: Could not inflate Behavior subclass android.support.design.widget.Menu
Caused by: java.lang.RuntimeException: Could not inflate Behavior subclass android.support.design.widget.Menu
at android.support.design.widget.CoordinatorLayout.parseBehavior(CoordinatorLayout.java:622)
at android.support.design.widget.CoordinatorLayout$LayoutParams.<init>(CoordinatorLayout.java:2805)
at android.support.design.widget.CoordinatorLayout.generateLayoutParams(CoordinatorLayout.java:1704)
at android.support.design.widget.CoordinatorLayout.generateLayoutParams(CoordinatorLayout.java:111)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:994)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:999)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828)
at android.view.LayoutInflater.inflate(LayoutInflater.java:519)
at android.view.LayoutInflater.inflate(LayoutInflater.java:427)
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 com.example.grayce.ttt.Home.onCreate(Home.java:59)
at android.app.Activity.performCreate(Activity.java:7232)
at android.app.Activity.performCreate(Activity.java:7221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2964)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
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:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
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)
04-21 22:36:20.609 17465-17465/? E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.widget.Menu" on path: DexPathList[[zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/base.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_resources_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/lib/arm, /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.support.design.widget.CoordinatorLayout.parseBehavior(CoordinatorLayout.java:615)
... 30 more
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.example.grayce.ttt-FUFgpDMn4tYP9oDMk4Lokg==/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:729)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:812)
at android.app.LoadedApk.getResources(LoadedApk.java:1034)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2357)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5870)
at android.app.ActivityThread.access$1200(ActivityThread.java:201)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1679)
... 6 more
From the looks of it, it looks like a the compiler is unable to find certain resource from the AndroidSupportLibrary. I would follow on #giridhar-karnik comment and upload the project on a repo for further analysis.
For now i can advice to take a look at the API number of SupportLibrary and the compile version of your app and make sure they are the same.
I have following following error which will cause my android app to jump out, where it jumps out is very inconsistent i can't pin point the code causing it. Anyone can read and understand what it is?
E/AndroidRuntime: FATAL EXCEPTION: Thread-22
Process: my.zen.com.uselessapp.xxxxxxxx, PID: 16384
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at com.google.android.gms.internal.ads.zzaj.zzb(Unknown Source:3)
at com.google.android.gms.internal.ads.zzai.zza(Unknown Source:4)
at com.google.android.gms.internal.ads.zzak.zzc(Unknown Source:32)
at com.google.android.gms.internal.ads.zzayl.zzc(Unknown Source:27)
at com.google.android.gms.internal.ads.zzn.processRequest(Unknown Source:28)
at com.google.android.gms.internal.ads.zzn.run(Unknown Source:12)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/base.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_dependencies_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_resources_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_0_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_1_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_2_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_3_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_4_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_5_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_6_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_7_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_8_apk.apk", zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/lib/arm64, /system/lib64]]
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 com.google.android.gms.internal.ads.zzaj.zzb(Unknown Source:3)
at com.google.android.gms.internal.ads.zzai.zza(Unknown Source:4)
at com.google.android.gms.internal.ads.zzak.zzc(Unknown Source:32)
at com.google.android.gms.internal.ads.zzayl.zzc(Unknown Source:27)
at com.google.android.gms.internal.ads.zzn.processRequest(Unknown Source:28)
at com.google.android.gms.internal.ads.zzn.run(Unknown Source:12)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/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:5798)
at android.app.ActivityThread.access$1100(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
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)
Application terminated.
Add this in you AndroidMenifest.xml inside <application> tag
<application
android:theme="#style/AppTheme">
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
</application>
You are getting a NoClassDefError
java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/apache/http/ProtocolVersion;
caused by
java.lang.ClassNotFoundException:
because the Dalvik executable (Dex) class loader couldn't find a particular class for run time
:
Didn't find class: "org.apache.http.ProtocolVersion"
when it tries to run your app
on path: DexPathList[[zip file "/data/app/my.zen.com.uselessapp.xxxxxxxx-CoQm7REaeOORs9mK5raYJw==/base.apk",
That is basically what it means. So check where this class could be used, I suspect one of your dependencies, and make sure everything is in order there, then try building again.
done:
generate a release a.abb
use bundletool to convert a.abb to a.apks.
deploy it to device.
problem:
the activity in dynamic feature no found.(but in debug, it's ok)
2019-02-25 20:48:58.429 11164-11164/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.demo.yang.myapplication, PID: 11164
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.demo.yang.myapplication/com.demo.yang.feature.TestActivity}: java.lang.ClassNotFoundException: Didn't find class "com.demo.yang.feature.TestActivity" on path: DexPathList[[zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/base.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.en.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.es.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ja.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ko.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.pt.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ru.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.vi.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.xxhdpi.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.zh.apk"],nativeLibraryDirectories=[/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/lib/arm64, /system/lib64, /vendor/lib64]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2839)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.demo.yang.feature.TestActivity" on path: DexPathList[[zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/base.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.en.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.es.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ja.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ko.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.pt.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.ru.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.vi.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.xxhdpi.apk", zip file "/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.zh.apk"],nativeLibraryDirectories=[/data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/lib/arm64, /system/lib64, /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:1180)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2829)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Suppressed: java.io.IOException: No original dex files found for dex location (arm64) /data/app/com.demo.yang.myapplication-mTCYObuADWrZE6proGE_tA==/split_config.en.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)
The fact that the class is found in debug but not in release suggests that it's possibly an issue with your proguard configuration (since Proguard is usually applied only on release builds).
Make sure you have
-keep public class * extends android.app.Activity
in your proguard file to ensure that the Activities are not obfuscated.
Please add this to your build.gradle at dynamic feature you create.
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
What worked for me was: remove all the tags <application> from the dynamic features' AndroidManifest and reunite all the Activities declarations on the application's AndroidManifest.
And before that I follow these migrations steps
I faced and fixed this issue. This problem arises, when you are not setting multiDexEnabled option correctly in your base build.gradle (app level) & the project itself.
defaultConfig {
...
multiDexEnabled true
}
And in dependencies
dependencies{
....
implementation "androidx.multidex:multidex:$multidex_version"
}
And you can extend your application class from MultiDexApplication
class YOUR_APPLICATION_CLASS : MultiDexApplication() {
// Rest of your code
}
In base app Manifest mention above application class like:
<application
android:name=".YOUR_APPLICATION_CLASS"
...
</application>
I paste less code for brevity.
After updating my phone to Android 9, and updating the sdk version to 4.8.1, i am having an issue while trying to register the sdk:
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/params/BasicHttpParams;
at dji.thirdparty.afinal.FinalHttp.<init>(Unknown Source:12)
at com.dji.frame.util.V_AppUtils.b(Unknown Source:9)
at dji.internal.version.b.a(Unknown Source:43)
at dji.internal.version.d.a(Unknown Source:8)
at dji.internal.version.VersionController.a(Unknown Source:12)
at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:49)
at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:129)
at dji.sdk.sdkmanager.DJISDKManager.access$1100(Unknown Source:0)
at dji.sdk.sdkmanager.DJISDKManager$5.run(Unknown Source:104)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.params.BasicHttpParams" on path: DexPathList[[zip file "/system/framework/com.android.future.usb.accessory.jar", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/base.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_dependencies_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_resources_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_0_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_1_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_2_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_3_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_4_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_5_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_6_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_7_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_8_apk.apk", zip file "/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_9_apk.apk", dex file "InMemoryDexFile[cookie=[0, 505806403584]]", dex file "InMemoryDexFile[cookie=[0, 505806404160]]"],nativeLibraryDirectories=[/data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/lib/arm64, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/base.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at dji.thirdparty.afinal.FinalHttp.<init>(Unknown Source:12)
at com.dji.frame.util.V_AppUtils.b(Unknown Source:9)
at dji.internal.version.b.a(Unknown Source:43)
at dji.internal.version.d.a(Unknown Source:8)
at dji.internal.version.VersionController.a(Unknown Source:12)
at dji.sdk.sdkmanager.DJISDKManager.initParams(Unknown Source:49)
at dji.sdk.sdkmanager.DJISDKManager.initSDKManager(Unknown Source:129)
at dji.sdk.sdkmanager.DJISDKManager.access$1100(Unknown Source:0)
at dji.sdk.sdkmanager.DJISDKManager$5.run(Unknown Source:104)
at java.lang.Thread.run(Thread.java:764)
2019-01-10 12:02:39.820 8784-8840/com.paragon.defenders E/AndroidRuntime: Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.paragon.defenders-aSWKRXZFLeJtYnRdOEyUKQ==/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:83)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:74)
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:735)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:818)
at android.app.LoadedApk.getResources(LoadedApk.java:1041)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2394)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5913)
at android.app.ActivityThread.access$1300(ActivityThread.java:207)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1748)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6863)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Is there another dependency that needs to be updated? Or currently version 4.8.1 is not stable yet for android 9?
My device - OnePlus 6T
The reason for the issue is Apache HTTP client deprecation beginning with Android 9.
Add this to your AndroidManifest.xml to fix:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
The problem was that my compileSdkVersion was 28 and when i ran the app on Android 9 i got this exception, I've changed it to 26 and the app is working now.
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.