ClassNotFoundException.

I am getting Java.Lan.ClassNotFoundException while implementing fire base in android .

This is the error log :

{Java.Lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$string" on path: DexPathList[[zip file "/data/app/ae.gov.mol.tawjeeh-1/base.apk"],nativeLibraryDirectories=[/data/app/ae.gov.mol.tawjeeh-1/lib/arm64, /system/fake-libs64, /data/app/ae.gov.mol.tawjeeh-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
--- End of managed Java.Lang.ClassNotFoundException stack trace ---
java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$string" on path: DexPathList[[zip file "/data/app/ae.gov.mol.tawjeeh-1/base.apk"],nativeLibraryDirectories=[/data/app/ae.gov.mol.tawjeeh-1/lib/arm64, /system/fake-libs64, /data/app/ae.gov.mol.tawjeeh-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.common.internal.zzbz.(Unknown Source)
at com.google.firebase.FirebaseOptions.fromResource(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1759)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1734)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5931)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5523)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5462)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1584)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
}

Posts

  • FabioCozzolinoFabioCozzolino ITBeta, University ✭✭✭

    same problem here!! :neutral:

  • Isha_DawarIsha_Dawar INMember ✭✭

    @szaid07 Try enabling Multi-Dex option under Android Build configuration options.

  • DevologyDevology GBMember ✭✭✭

    I'm experiencing this issue, my settings are...

    Generate on package (.pak) per selected ABI
    Enable Multi-Dex
    Dex Compiler d8
    Code Shrinker r8

    Link SDK assemblies only

    I have seen reports this is because of R8 and it should be disabled until stable and use ProGuard instead. However, in the latest Visual Studio for Mac I no longer see the ProGuard options and may need to resort to hacking the project file.

    I don't think this was a problem until I updated all my Nugets, so I might roll back the Google Play libraries to see if that fixes things.

    More information is at https://github.com/xamarin/xamarin-android/issues/3188

Sign In or Register to comment.