Experiencing the below mentioned crash on Nexus 5 (Android 5.0.1) but my apk is working on other Android version including 5.0.2. We are experiencing at the facebook login for the first time only which is also on Nexus 5.0.1. Any idea?
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager;
at com.facebook.AppEventsLogger.flushAndWait(AppEventsLogger.java:761)
at com.facebook.AppEventsLogger.access$1(AppEventsLogger.java:733)
at com.facebook.AppEventsLogger$2.run(AppEventsLogger.java:605)
at java.util.Timer$TimerImpl.run(Timer.java:284)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.LocalBroadcastManager" on path: DexPathList[[zip file "/data/app/com.base.cricketduniya-1/base.apk"],nativeLibraryDirectories=[/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)
... 4 more
Suppressed: java.lang.ClassNotFoundException: android.support.v4.content.LocalBroadcastManager
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)
... 5 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Related
I'm trying to use AWS amplify on android 6, but the app crashes suddenly after 30 seconds after the Configuration and gets this error.
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/LocalDateTime;
at com.amplifyframework.devmenu.PersistentLogger.addToLogs(PersistentLogger.java:116)
at com.amplifyframework.devmenu.PersistentLogger.debug(PersistentLogger.java:88)
at com.amplifyframework.logging.BroadcastLogger.debug(BroadcastLogger.java:101)
at com.amplifyframework.analytics.pinpoint.AutoEventSubmitter.lambda$new$0$AutoEventSubmitter(AutoEventSubmitter.java:44)
at com.amplifyframework.analytics.pinpoint.-$$Lambda$AutoEventSubmitter$kRbNZmP2XU9xJOUcrfJ3PKgcA28.run(lambda)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: java.lang.ClassNotFoundException: Didn't find class "java.time.LocalDateTime" on path: DexPathList[[zip file "/data/app/com.nowpay.nowpay-1/base.apk"],nativeLibraryDirectories=[/data/app/com.nowpay.nowpay-1/lib/arm, /data/app/com.nowpay.nowpay-1/base.apk!/lib/armeabi-v7a, /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.amplifyframework.devmenu.PersistentLogger.addToLogs(PersistentLogger.java:116)
at com.amplifyframework.devmenu.PersistentLogger.debug(PersistentLogger.java:88)
at com.amplifyframework.logging.BroadcastLogger.debug(BroadcastLogger.java:101)
at com.amplifyframework.analytics.pinpoint.AutoEventSubmitter.lambda$new$0$AutoEventSubmitter(AutoEventSubmitter.java:44)
at com.amplifyframework.analytics.pinpoint.-$$Lambda$AutoEventSubmitter$kRbNZmP2XU9xJOUcrfJ3PKgcA28.run(lambda)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)
Suppressed: java.lang.ClassNotFoundException: java.time.LocalDateTime
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 trace available
The basic problem here is that the app is trying to reference a class which doesn't exist at runtime:
java.lang.ClassNotFoundException: Didn't find class "java.time.LocalDateTime"
Initial runtime support for java.time.* was added to Android in API Level 26. For a period of time, java.time.* only worked on these devices.
As of Android Studio 4, java.time.* APIs can be "de-sugared" at build time. When using this functionality, the resulting code will run on all versions of Android. To benefit from this support, you must have Android Studio 4 or higher, and enable "core library desugaring." See the documentation for more details: https://developer.android.com/studio/write/java8-support#library-desugaring
I got the below error when running on a physical android API 24:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/common/base/CharMatcher;
at com.google.common.base.Splitter.on(Splitter.java:125)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:203)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:84)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java:119)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:48)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:27)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:73)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(com.google.firebase:firebase-firestore##21.1.1:92)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$new$0(com.google.firebase:firebase-firestore##21.1.1:62)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.call(com.google.firebase:firebase-firestore##21.1.1)
at com.google.android.gms.tasks.zzv.run(Unknown Source)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(com.google.firebase:firebase-firestore##21.1.1:54)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor$$Lambda$1.run(com.google.firebase:firebase-firestore##21.1.1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.common.base.CharMatcher" on path: DexPathList[[zip file "/data/app/com.byte_artisan.mchat2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.byte_artisan.mchat2-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.common.base.Splitter.on(Splitter.java:125)
at io.grpc.internal.GrpcUtil.<clinit>(GrpcUtil.java:203)
at io.grpc.internal.AbstractManagedChannelImplBuilder.<clinit>(AbstractManagedChannelImplBuilder.java:84)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java:119)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:48)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:27)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:73)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(com.google.firebase:firebase-firestore##21.1.1:92)
at com.google.firebase.firestore.remote.GrpcCallProvider.lambda$new$0(com.google.firebase:firebase-firestore##21.1.1:62)
at com.google.firebase.firestore.remote.GrpcCallProvider$$Lambda$1.call(com.google.firebase:firebase-firestore##21.1.1)
at com.google.android.gms.tasks.zzv.run(Unknown Source)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(com.google.firebase:firebase-firestore##21.1.1:54)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor$$Lambda$1.run(com.google.firebase:firebase-firestore##21.1.1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Suppressed: java.lang.NoClassDefFoundError: com.google.common.base.CharMatcher
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:321)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 18 more
Suppressed: java.lang.ClassNotFoundException: com.google.common.base.CharMatcher
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)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
Observing the stack, the error seems to come from firestore initialization.
The error start to pop after recent updates of firebase libraries, can´t precise with one or witch version. Also the app starts well in recent versions of Android.
The problem was a conflict with guava library, according to this long post on github.
To fix i needed to change the guava version from '28.0-jre' to '28.0-android', like this:
implementation group: 'com.google.guava', name: 'guava', version: '28.1-android'
Hope can save someone a few hours.
I had been contacted to put a new library in the form of an AAR into my application. It worked fine before adding this AAR, but after that, every time I start it up, it crashes with the following stacktrace:
09-10 21:10:55.272 10354-10354/? W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/tasks/TaskCompletionSource;
at com.google.firebase.remoteconfig.FirebaseRemoteConfig.zza(Unknown Source)
at com.google.firebase.remoteconfig.FirebaseRemoteConfig.fetch(Unknown Source)
at com.picmix.mobile.activity.SplashActivity.onCreate(SplashActivity.java:89)
at android.app.Activity.performCreate(Activity.java:6093)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2458)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.access$1000(ActivityThread.java:164)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1462)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:5541)
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:964)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.tasks.TaskCompletionSource" on path: DexPathList[[zip file "/data/app/com.picmix.mobile-2/base.apk"],nativeLibraryDirectories=[/data/app/com.picmix.mobile-2/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)
... 16 more
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.tasks.TaskCompletionSource
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)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
From my experience, this kind of error is because I hadn't enabled MultiDex support. The strange thing is that I have it enabled, my gradle file contains the following line:
compile 'com.android.support:multidex:1.0.3'
The application I use in the manifest extends MultiDexApplication instead of just Application.
So is it something with that AAR?
Hello everyone I am new with using firebase lab test , I am trying to do Robo Test ,
I already upload apk , but it keep crashing the error it gives me that it didn't recgnize APP file in the project , I already test my app on 3 different physical devices with different API and companies (HTC , Samsung ) .. and it works fine
and here is a full Test issues .
FATAL EXCEPTION: main
Process: com.example.mol.saherproject, PID: 8122
java.lang.RuntimeException: Unable to instantiate application com.example.mol.saherproject.settings.APP: java.lang.ClassNotFoundException: Didn't find class "com.example.mol.saherproject.settings.APP" on path: DexPathList[[zip file "/data/app/com.example.mol.saherproject-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.mol.saherproject-1/lib/arm, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:578)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.mol.saherproject.settings.APP" on path: DexPathList[[zip file "/data/app/com.example.mol.saherproject-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.mol.saherproject-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 android.app.Instrumentation.newApplication(Instrumentation.java:981)
at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
... 9 more
Suppressed: java.lang.ClassNotFoundException: com.example.mol.saherproject.settings.APP
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)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
any help please ...
Working on upgrading my UrbanAirship to 7.2. No compilation errors and the app runs fine until it receives a push message. At that point, it crashes with the following stack trace:
UALib: ManifestUtils - Unable to find class:
com.urbanairship.push.GCMPushReceiver
java.lang.ClassNotFoundException:
com.urbanairship.push.GCMPushReceiver
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at java.lang.Class.forName(Class.java:285)
at
com.urbanairship.util.ManifestUtils.validateManifest(ManifestUtils.java:215)
at com.urbanairship.UAirship.validateManifest(UAirship.java:736)
at com.urbanairship.UAirship.executeTakeOff(UAirship.java:343)
at com.urbanairship.UAirship.access$000(UAirship.java:42)
at com.urbanairship.UAirship$2.run(UAirship.java:299)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class
"com.urbanairship.push.GCMPushReceiver" on path: DexPathList[[zip file
"/data/app/com.xxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx-1/lib/arm,
/data/app/com.xxx-1/base.apk!/lib/armeabi-v7a, /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 java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at java.lang.Class.forName(Class.java:285)
at
com.urbanairship.util.ManifestUtils.validateManifest(ManifestUtils.java:215)
at com.urbanairship.UAirship.validateManifest(UAirship.java:736)
at com.urbanairship.UAirship.executeTakeOff(UAirship.java:343)
at com.urbanairship.UAirship.access$000(UAirship.java:42)
at com.urbanairship.UAirship$2.run(UAirship.java:299)
at java.lang.Thread.run(Thread.java:818)
Suppressed: java.lang.ClassNotFoundException:
com.urbanairship.push.GCMPushReceiver
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 trace available
When I check to see if the class is visible (Cmd-O) and start typing, the class comes up immediately.
Has anyone encountered this? I have no idea how to fix it. Thanks.
We renamed GCMPushReceiver to GcmPushReceiver. You should remove all the Urban Airship receivers, services, and activities from your manifest and let auto manifest integration merge them for you.