I am getting following error with android 10. Although i tried with my device having android 10, everything is working fine but Google crashlytics showing number of crash.
Fatal Exception: java.lang.RuntimeException
Unable to get provider androidx.core.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "androidx.core.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/base.apk", zip file "/data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/split_config.arm64_v8a.apk", zip file "/data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/lib/arm64, /data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/base.apk!/lib/arm64-v8a, /data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/com.xyz-MraZIoKhOLuyDHnQOgA2Cg==/split_config.xxhdpi.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
Fatal Exception: java.lang.RuntimeException: Unable to get provider androidx.core.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "androidx.core.content.FileProvider" on path: DexPathList[[zip file "/data/app/-MraZIoKhOLuyDHnQOgA2Cg==/base.apk", zip file "/data/app/c-MraZIoKhOLuyDHnQOgA2Cg==/split_config.arm64_v8a.apk", zip file "/data/app/-MraZIoKhOLuyDHnQOgA2Cg==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/-MraZIoKhOLuyDHnQOgA2Cg==/lib/arm64, /data/app-MraZIoKhOLuyDHnQOgA2Cg==/base.apk!/lib/arm64-v8a, /data/app/-MraZIoKhOLuyDHnQOgA2Cg==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /data/app/MraZIoKhOLuyDHnQOgA2Cg==/split_config.xxhdpi.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:7443)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6935)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6852)
at android.app.ActivityThread.access$1600(ActivityThread.java:242)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7830)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1040)
Have you registered your provider in the AndroidManifest.xml file?
as it is said in docs
If Yes, you will need to provide more information about how you work with the FileProvider class
Related
I've read a few answers on this site with the same or similar error messages, and I've tried all the solutions already. Sadly, none of them have worked so far.
My gradle files all look like they're properly set up for Multidex, the Application class extends MultiDexApplication and is referenced correctly in the manifest, I've cleaned all caches and restarted the IDE, deleting builds from the project and the device and re-building/re-installing, etc. etc.
Inspecting the APK, I found the Application in classes2.dex, correctly referencing .super Landroidx/multidex/MultiDexApplication;
The stack I'm getting is like this:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.<REDACTED>, PID: 25475
java.lang.RuntimeException: Unable to instantiate application com.<REDACTED>.Application: java.lang.ClassNotFoundException: Didn't find class "com.<REDACTED>.Application" on path: DexPathList[[zip file "/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/base.apk"],nativeLibraryDirectories=[/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:1306)
at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7401)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7374)
at android.app.ActivityThread.access$1500(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2118)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.<REDACTED>.Application" on path: DexPathList[[zip file "/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/base.apk"],nativeLibraryDirectories=[/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/lib/arm64, /system/lib64, /system/system_ext/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:76)
at android.app.Instrumentation.newApplication(Instrumentation.java:1158)
at android.app.LoadedApk.makeApplication(LoadedApk.java:1298)
at android.app.ActivityThread.handleMakeApplication(ActivityThread.java:7401)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7374)
at android.app.ActivityThread.access$1500(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2118)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/base.apk because: Failure to verify dex file '/data/app/~~b-NK-x066lFdY_bh0tm6ew==/com.<REDACTED>-V2WCXZvYqUZRGKbFMfmgFg==/base.apk': Bad index for method_handle_item method_idx: ffff >= de57
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:367)
at dalvik.system.DexFile.<init>(DexFile.java:109)
at dalvik.system.DexFile.<init>(DexFile.java:82)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
at dalvik.system.DexPathList.<init>(DexPathList.java:166)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:933)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:990)
at android.app.LoadedApk.getResources(LoadedApk.java:1234)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2788)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2780)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7263)
... 8 more
Can anyone figure out what this is all about?
In the module level build.gradle, we added these lines:
// Near the top
apply plugin: 'com.google.firebase.crashlytics'
// ...
android {
// ...
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
// ...
}
// ...
I have no idea how this fixed this crash, but I suppose that's what I get for using "It just works" libraries.
I pubblished an app on google play. Then I linked it to Admob and the app works, showing me the banner of admob. Sometimes, on launch, it crashes, sometimes not. I viewed Android Studio Logcat and this is the error. Can someone help me?
Process: it.bluebait.mycurrency, PID: 13200
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at lt.b(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
at ls.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:1)
at lu.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:10)
at kx.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:7)
at kx.run(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/dl-AdsFdrDynamite.integ_30000000.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/n/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ac.loadClass(:com.google.android.gms.dynamite_dynamiteloader#16089081#16.0.89 (100400-239467275):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at lt.b(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
at ls.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:1)
at lu.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:10)
at kx.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:7)
at kx.run(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
2019-04-09 19:43:27.941 15295-15544/? E/AndroidRuntime: FATAL EXCEPTION: Thread-10
Process: it.bluebait.mycurrency, PID: 15295
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at lt.b(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
at ls.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:1)
at lu.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:10)
at kx.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:7)
at kx.run(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/dl-AdsFdrDynamite.integ_30000000.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/n/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ac.loadClass(:com.google.android.gms.dynamite_dynamiteloader#16089081#16.0.89 (100400-239467275):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at lt.b(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
at ls.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:1)
at lu.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:10)
at kx.a(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:7)
at kx.run(:com.google.android.gms.policy_ads_fdr_dynamite#30000#30000.238272502.238272502:2)
2019-04-09 19:43:27.953 563-563/? E/SELinux: avc: denied { find } for service=opdiagnose pid=15295 uid=10236 scontext=u:r:untrusted_app:s0:c236,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0
2019-04-09 19:43:27.956 563-563/? E/SELinux: avc: denied { find } for service=opdiagnose pid=15295 uid=10236 scontext=u:r:untrusted_app:s0:c236,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0
Android 9.0 finally removed by default all traces of the old Apache HTTP library. However it seems that some libraries need it. You need to add this to your manifest inside the <application> element:
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
Source: https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p
i Suggest updating you update the dependencies to the latest versions.
classpath 'com.google.gms:google-services:4.0.1'
Error Log:
System.err: java.lang.ClassNotFoundException: Didn't find class "com.twilio.voice.impl.session.Account" on path: DexPathList[[zip file "/data/app/packaege.name-1/base.apk"],nativeLibraryDirectories=[/data/app/packaege.name-1/lib/arm64, /data/app/packaege.name-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
E/jni_mate: #
# Fatal error in /var/lib/jenkins/jobs/jni-mate/workspace/configuration/Release/label/master/jni-mate/src/main/jni/classreferenceholder.cc, line 92
# Check failed: !jni->ExceptionCheck()
# error during FindClass: com/twilio/voice/impl/session/Account
Compiled an APK and tested it successfully on my device, tried it through the Google Play Store and it stops working immediately. This app is a copy of an existing app, since you cannot have the same package name twice I simply renamed the package name in the AndroidManifest.xml, compiled it, tested it and then uploaded it to the Play Store.
I do not understand why the app works when I copy it to a device but the same app fails when loaded through the Play Store. I generated a crash report which I accessed from the Play Store Developer Console. If anyone has experience of successfully duplicating apps on the Store then your help would be appreciated.
java.lang.RuntimeException: Unable to instantiate application de.schildbach.wallet.artbyte.WalletApplication: java.lang.ClassNotFoundException: Didn't find class "de.schildbach.wallet.artbyte.WalletApplication" on path: DexPathList[[zip file "/data/app/de.schildbach.wallet.artbyte-1/base.apk"],nativeLibraryDirectories=[/data/app/de.schildbach.wallet.artbyte-1/lib/arm, /data/app/de.schildbach.wallet.artbyte-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:680)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6395)
at android.app.ActivityThread.access$1800(ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: java.lang.ClassNotFoundException: Didn't find class "de.schildbach.wallet.artbyte.WalletApplication" on path: DexPathList[[zip file "/data/app/de.schildbach.wallet.artbyte-1/base.apk"],nativeLibraryDirectories=[/data/app/de.schildbach.wallet.artbyte-1/lib/arm, /data/app/de.schildbach.wallet.artbyte-1/base.apk!/lib/armeabi, /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:1005)
at android.app.LoadedApk.makeApplication(LoadedApk.java:670)
... 9 more
Suppressed: java.lang.ClassNotFoundException: de.schildbach.wallet.artbyte.WalletApplication
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
The Exception says that build is failed due to class not found on dex path list. Build the apk by cleaning the project and also recompile the native code using the ndk-build command. Then try it on the local device and then upload to play store.
The package name in AndroidManifest.xml is often also used for the code base, e.g. as class name of the activities. If you only rename the package name but leave the Java/dex code unchanged Android will not be able to find some classes as you already have noticed.
Check the AndroidManifest.xml for package relative class names (those that start with a .) and prepend the old package name:
Example
Old package name: org.example.myapp
Old activity name: <activity android:name=".MyActivity" ..>
New package name: com.example.newappname
New activity name: <activity android:name="org.example.myapp.MyActivity" ..>
When trying to register to receive notifications using the Parse.com module (https://trigger.io/modules/parse/current/docs/index.html) I receive the following error in trigger.io console. I have tried on Linux and OSX using up to date trigger.io and up to date Android SDK.
Have I missed something in the configuration?
[FORGE] 'error subscribing to beta-tester notifications: {"message":"Forge Java error: ClassNotFoundException: Didn\'t find class \\"bolts.Task\\" on path: DexPathList[[zip file \\"/data/app/io.trigger.forge2172634a55fa11e5a76f12313b0234c0-1/base.apk\\"],nativeLibraryDirectories=[/data/app/io.trigger.forge2172634a55fa11e5a76f12313b0234c0-1/lib/x86, /vendor/lib, /system/lib]]","type":"UNEXPECTED_FAILURE","subtype":null,"full_error":"java.lang.ClassNotFoundException: Didn\'t find class \\"bolts.Task\\" on path: DexPathList[[zip file \\"/data/app/io.trigger.forge2172634a55fa11e5a76f12313b0234c0-1/base.apk\\"],nativeLibraryDirectories=[/data/app/io.trigger.forge2172634a55fa11e5a76f12313b0234c0-1/lib/x86, /vendor/lib, /system/lib]]\\n\\tat dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\\n\\tat java.lang.ClassLoader.loadClass(ClassLoader.java:511)\\n\\tat java.lang.ClassLoader.loadClass(ClassLoader.java:469)\\n\\tat com.parse.gz.a(Unknown Source)\\n\\tat com.parse.fb.c(Unknown Source)\\n\\tat com.parse.fb.g(Unknown Source)\\n\\tat com.parse.cx.s(Unknown Source)\\n\\tat com.parse.dt.a(Unknown Source)\\n\\tat com.parse.dr.a(Unknown Source)\\n\\tat com.parse.dr.a(Unknown Source)\\n\\tat io.trigger.forge.android.modules.parse.API.push_subscribe(Unknown Source)\\n\\tat java.lang.reflect.Method.invoke(Native Method)\\n\\tat io.trigger.forge.android.core.ForgeApp.callJavaFromJavaScript(Unknown Source)\\n\\tat io.trigger.forge.android.core.ForgeJSBridge$1.run(Unknown Source)\\n\\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\\n\\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\\n\\tat java.lang.Thread.run(Thread.java:818)\\n\\tSuppressed: java.lang.ClassNotFoundException: bolts.Task\\n\\t\\tat java.lang.Class.classForName(Native Method)\\n\\t\\tat java.lang.BootClassLoader.findClass(ClassLoader.java:781)\\n\\t\\tat java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\\n\\t\\tat java.lang.ClassLoader.loadClass(ClassLoader.java:504)\\n\\t\\t... 15 more\\n\\tCaused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available\\n"}'
Turns out I didn't read the docs properly. I had failed to add the facebook module https://trigger.io/modules/facebook/current/docs/index.html.
See https://trigger.io/modules/parse/current/docs/index.html.