Android IDE (AIDE) Support Forum

App crashes due to class error regarding androidx

I’m getting strange error that i can’t figure out. I tried many ways to solve but still getting error with androidx related.

04-14 12:29:17.721 D/AndroidRuntime(32191): Shutting down VM
04-14 12:29:17.724 E/AndroidRuntime(32191): FATAL EXCEPTION: main
04-14 12:29:17.724 E/AndroidRuntime(32191): Process: com.nadigapp.desiespimportant, PID: 32191
04-14 12:29:17.724 E/AndroidRuntime(32191): java.lang.RuntimeException: Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: Didn’t find class “androidx.lifecycle.ProcessLifecycleOwnerInitializer” on path: DexPathList[[zip file “/data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/base.apk”],nativeLibraryDirectories=[/data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/lib/arm64, /data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.installProvider(ActivityThread.java:6433)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.installContentProviders(ActivityThread.java:5975)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5881)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.access$1100(ActivityThread.java:205)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.os.Handler.dispatchMessage(Handler.java:106)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.os.Looper.loop(Looper.java:280)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.main(ActivityThread.java:6706)
04-14 12:29:17.724 E/AndroidRuntime(32191): at java.lang.reflect.Method.invoke(Native Method)
04-14 12:29:17.724 E/AndroidRuntime(32191): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
04-14 12:29:17.724 E/AndroidRuntime(32191): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
04-14 12:29:17.724 E/AndroidRuntime(32191): Caused by: java.lang.ClassNotFoundException: Didn’t find class “androidx.lifecycle.ProcessLifecycleOwnerInitializer” on path: DexPathList[[zip file “/data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/base.apk”],nativeLibraryDirectories=[/data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/lib/arm64, /data/app/com.nadigapp.desiespimportant-IXi1G5mAFe2wXvqIkaRqFg==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
04-14 12:29:17.724 E/AndroidRuntime(32191): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
04-14 12:29:17.724 E/AndroidRuntime(32191): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
04-14 12:29:17.724 E/AndroidRuntime(32191): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:121)
04-14 12:29:17.724 E/AndroidRuntime(32191): at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:62)
04-14 12:29:17.724 E/AndroidRuntime(32191): at android.app.ActivityThread.installProvider(ActivityThread.java:6417)
04-14 12:29:17.724 E/AndroidRuntime(32191): … 10 more

Are you trying to compile using the NDK? With Graddle, you cannot.

Otherwise, you’ll need to distill your code down to the offending methods and post the code here. It’s nearly impossible to help you based on just the logcat and no other information (unless I missed the obvious because of the quantity).