question

XamDev-9530 avatar image
0 Votes"
XamDev-9530 asked XamDev-9530 commented

Error java.lang.ClassNotFoundException: at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:196)

Hi,

I am using xamain.forms and getting this error message in crash report of android.

java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4200)
at android.app.ActivityThread.access$1700 (ActivityThread.java:274)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2113)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:8167)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1100)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateReceiver (AppComponentFactory.java:110)
at android.support.v4.app.CoreComponentFactory.instantiateReceiver (Unknown Source)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:4193)

I am using r8 code shrinker. I have these -keep lines class com.google.android.gms.** { ; }
-dontwarn com.google.android.gms.
* in r8.cfg but the error is still there



dotnet-xamarin
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Could you share the Linker selection? If you set the Linker to None. When you debug your application, does it worked as normal?

0 Votes 0 ·

Hi,

I never experienced this error during debug or in the released version but this error logged in the Google Play Console's crash report.

75924-image.png


0 Votes 0 ·

If you build and release your application do not have this issue, this error logged in the Google Play Console's crash report. You can open a thread in the Google play community or contact google supporter. If it needs to enable Multi-Dex.

1 Vote 1 ·

Could you create an android emulator, un-select the Google Play Services/Google Play Store installed like following screenshot?

76930-image.png

Then re-deploy your application to this emulator, if you can get the same error.


0 Votes 0 ·
image.png (13.3 KiB)
Show more comments

Did you manage to fix it? currently experiencing the same issue

0 Votes 0 ·

I have tried everything but still no luck. Please let me know if you will find the fix for this problem.

thanks

0 Votes 0 ·

0 Answers