I have published an Xamarin.Forms Android application into GooglePlay.
Unforutnealy for some of users application crashes at startup. I have found the phone which is failing however when I run the app from VisualStudio the application is running without any problems both on Release and Debug mode.
One of users sent me StackTrace:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxx.xxxxx/crc642a6544fecbbce030.SplashActivity}: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2747)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class androidx.appcompat.widget.FitWindowsLinearLayout
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/com.prasowka.news-1/base.apk", zip file "/data/app/com.prasowka.news-1/split_config.arm64_v8a.apk", zip file "/data/app/com.prasowka.news-1/split_config.pl.apk", zip file "/data/app/com.prasowka.news-1/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.prasowka.news-1/lib/arm64, /data/app/com.prasowka.news-1/base.apk!/lib/arm64-v8a, /data/app/com.prasowka.news-1/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/com.prasowka.news-1/split_config.pl.apk!/lib/arm64-v8a, /data/app/com.prasowka.news-1/split_config.xxhdpi.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:74)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:812)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752)
at android.view.LayoutInflater.inflate(LayoutInflater.java:499)
at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(Unknown Source)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(Unknown Source)
at androidx.appcompat.app.AppCompatDelegateImpl.onPostCreate(Unknown Source)
at androidx.appcompat.app.AppCompatActivity.onPostCreate(Unknown Source)
at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1200)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2729)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2808)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.prasowka.news-1/split_config.arm64_v8a.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:373)
at dalvik.system.DexFile.<init>(DexFile.java:113)
at dalvik.system.DexFile.<init>(DexFile.java:78)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
at dalvik.system.DexPathList.<init>(DexPathList.java:126)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
at android.app.LoadedApk.getResources(LoadedApk.java:773)
at android.app.ContextImpl.<init>(ContextImpl.java:2078)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
... 6 more
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.prasowka.news-1/split_config.pl.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:373)
at dalvik.system.DexFile.<init>(DexFile.java:113)
at dalvik.system.DexFile.<init>(DexFile.java:78)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
at dalvik.system.DexPathList.<init>(DexPathList.java:126)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
at android.app.LoadedApk.getResources(LoadedApk.java:773)
at android.app.ContextImpl.<init>(ContextImpl.java:2078)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
... 6 more
Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.prasowka.news-1/split_config.xxhdpi.apk
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:373)
at dalvik.system.DexFile.<init>(DexFile.java:113)
at dalvik.system.DexFile.<init>(DexFile.java:78)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:366)
at dalvik.system.DexPathList.makeElements(DexPathList.java:327)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:263)
at dalvik.system.DexPathList.<init>(DexPathList.java:126)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:62)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:64)
at com.android.internal.os.PathClassLoaderFactory.createClassLoader(PathClassLoaderFactory.java:43)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:58)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:522)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:555)
at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1942)
at android.app.LoadedApk.getResources(LoadedApk.java:773)
at android.app.ContextImpl.<init>(ContextImpl.java:2078)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2023)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5410)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1611)
... 6 more
Did anyone of you faces similar issue after publishing app to the Google Store?
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.
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'm trying to integrate the sdk to my Unity project, but when I call the method to load an interstitial I receive an exception telling Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd.
I inspected the com.google.android.gms:play-services-ads:15.0.1 package and I did not find this class there. Am I missing some import?
This is the error I'm getting
W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd;
at com.google.unity.ads.Interstitial$1.run(Interstitial.java:66)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.InterstitialAd" on path: DexPathList[[zip file "/data/app/com.test.app-1/base.apk", zip file "/data/app/com.test.app-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.test.app-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 9 more
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.InterstitialAd
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 10 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.test.app, PID: 3786
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2018.2.6f1
Device model : samsung GT-I9505
Device fingerprint: samsung/jfltevj/jflte:5.0.1/LRX22C/I9505VJUHOC1:user/release-keys
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/InterstitialAd;
at com.google.unity.ads.Interstitial$1.run(Interstitial.java:66)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.InterstitialAd" on path: DexPathList[[zip file "/data/app/com.test.app-1/base.apk", zip file "/data/app/com.test.app-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.test.app-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.test.app-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.unity.ads.Interstitial$1.run(Interstitial.java:66)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.ads.InterstitialAd
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 10 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
I'm trying to show a MapView inside a Fragment and I get an error when I inflate it:
03-21 14:34:44.234 32691-32691/com.example.javiersanzrozalen.fatrunners E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.javiersanzrozalen.fatrunners, PID: 32691
android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class com.google.android.gms.maps.MapView
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.google.android.gms.maps.MapView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at com.example.javiersanzrozalen.fatrunners.Fragments.NuevaCarreraFragment.onCreateView(NuevaCarreraFragment.java:53) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363 at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) 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: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable; at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) at com.google.android.gms.maps.MapView.<init>(Unknown Source) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at com.example.javiersanzrozalen.fatrunners.Fragments.NuevaCarreraFragment.onCreateView(NuevaCarreraFragment.java:53) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363 at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
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: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable" on path: DexPathList[[zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/base.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.javiersanzrozalen.fatrunners-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.javiersanzrozalen.fatrunners-2/lib/x86, /system/lib, /vendor/lib]]
03-21 14:34:44.234 32691-32691/com.example.javiersanzrozalen.fatrunners E/AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 27 more
Any idea ? This is the XML where I place my MapView:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Fragments.NuevaCarreraFragment">
<com.google.android.gms.maps.MapView
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
UPDATE
Finally solved it compiling the last version of Google Maps library recommended.
You are attempting to use the original version of Google Maps support for Android (com.google.android.maps). We refer to that now as Maps V1.
This will not work, as Maps V1 has been deprecated for over two years. You can no longer get API keys for it, so even if your code would be correct, it would not work. The crash is because the old MapView had to be used inside of a MapActivity, as the error indicates.
The current version of Google Maps support for Android — Maps V2 — has a very different API and does not involve classes in the com.google.android.maps package.