1

I'm Working on a GoogleMap Application I'm not using Firebase but I am getting Firebase Error

I've tried with multiDexEnabled true and without it, and it doesn't work.

I've tried updating Google Play Services, but it doesn't work

It works fine in Android 6.0 emulator

It gives me error on a 4.4.2 real device and in the 4.1.1 emulator

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

 at com.google.firebase.FirebaseApp.zzbu(Unknown Source)

build.gradle

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24"

    defaultConfig {
        applicationId "test.navigationdrawer"
        minSdkVersion 11
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
        multiDexEnabled true


    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:design:24.0.0'
    compile 'com.google.android.gms:play-services:9.0.2'


}

Here Is My SDK Image

enter image description here

Devid Farinelli
  • 7,514
  • 9
  • 42
  • 73
Vanraj Ghed
  • 1,261
  • 11
  • 23
  • try to use "com.google.android.gms:play-services-maps:9.2.0" gradle in your app.gradle – Ando Masahashi Jul 04 '16 at 06:26
  • Replace compile 'com.google.android.gms:play-services:9.0.2' with the only the libraries that you need. For more information on selective services refer this https://developers.google.com/android/guides/setup#add_google_play_services_to_your_project – Sunil Sunny Jul 04 '16 at 06:31
  • Possible duplicate of [java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions](http://stackoverflow.com/questions/37421203/java-lang-noclassdeffounderror-com-google-firebase-firebaseoptions) – Daniel Nugent Jul 04 '16 at 06:38
  • @AndoMasahashi Bro I Try This It's Not Workign – Vanraj Ghed Jul 04 '16 at 07:46
  • @sunilsunny Bro I Try This It's Not Workign – Vanraj Ghed Jul 04 '16 at 07:47
  • what all services do you need. ? Try cleaning the project after adding the required services. – Sunil Sunny Jul 04 '16 at 09:02

0 Answers0