Getting Exception Java.Lang.Noclassdeffounderror: Com.Google.Firebase.Firebaseoptions After Updating to the New Firebase

Getting Exception java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

This worked for me:

  1. If you haven't already, update your 'Google Play Services' to Revision 30 from Android SDK Manager > Extras.

Android SDK Manager > Extras > Google Play Services


  1. And then add the line compile 'com.android.support:multidex:1.0.1' to your dependancies (or simply remove multiDexEnabled true if not required)

  2. Add this attribute to the application tag in manifest: android:name="android.support.multidex.MultiDexApplication"

    If you already have a custom application class defined in Android Manifest, extend it from MultiDexApplication instead of Application

Hope it helped!

Android Firebase NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase

In your case

Remove this dependency from your build.gradle file

compile 'com.google.android.gms:play-services:9.4.0'

and Add separate one like this

compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-location:9.4.0'

this should solve your problem.

java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions

Thanks for posting the question Sanket. I'm the PM on Firebase Test Lab (formerly Cloud Test Lab). Wanted to let you know that this is a bug on our end that should now be fixed.

It seems that your app is currently using the latest and greatest Google Play Services. We updated our devices to use them last week then we discovered a bug that had us revert to an older version. Right now, we re-deployed the latest Play services on our devices so rerunning your tests should work. If not, please let me know and we'll look into it and fix it.

Android NoClassDefFoundError: com.google.firebase.FirebaseOptions

first update your Google Repository in your sdk
second enable multidex like

defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}

compile with

compile 'com.android.support:multidex:1.0.1'
classpath 'com.google.gms:google-services:3.0.0'

Firebase Admin NoClassDefFoundError: FirebaseOptions$Builder

The problem turned out to be that I was using this command to build:

gradlew clean install

However, the Jar generated by that doesn't contain the dependencies. And the Firebase Admin SDK is a dependency.

So what I did is I used shadowJar, which generates a Jar that contains dependencies. Unlike gradlew clean install.

Then, in the Procfile, I set it to the Jar that shadowJar generates. The only problem I see to have is, now I have to go to IntelliJ and run the shadowJar from there, since there doesn't seem any command to run it from the commandline.

Hope this helps



Related Topics



Leave a reply



Submit