Android Question

Android NoClassDefFoundError: com.google.firebase.FirebaseOptions

When i run my codes Adroid studio gives that error

my gradle file like under below and Android Studio v2.2 gradle is 'com.android.tools.build:gradle:2.2.0-alpha1'

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

packagingOptions {

exclude 'META-INF/DEPENDENCIES'
}

defaultConfig {
applicationId "com.asd.asd"
minSdkVersion 14
targetSdkVersion 23
versionCode 9
versionName "1.3.4"
multiDexEnabled true
}

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

javaMaxHeapSize "4g"
jumboMode true
preDexLibraries false
}
}

dependencies {
compile project(':mPChartLib')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.code.gson:gson:2.3.1'
compile files('libs/commons-httpclient-3.1.jar')
compile files('libs/signpost-commonshttp4-1.2.1.2.jar')
compile files('libs/signpost-core-1.2.1.2.jar')
compile files('libs/pushwoosh-4.0.4.jar')
compile files('libs/httpcore-4.4.4.jar')
compile files('libs/httpclient-4.5.2.jar')
compile 'com.google.android.gms:play-services:9.0.0'



}


05-30 20:41:50.785 14551-14551/com.asd.asd/AndroidRuntime: FATAL EXCEPTION: main Process: com.asd.asd, PID: 14551
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1638)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1609)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5008)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4582)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4522)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5292)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
at dalvik.system.NativeStart.main(Native Method)


idont use any firebase application but i got this error. so i try somany tecnique which are found on internet . but noting change .

can you help me pls

Answer

first update your Google Repository in your sdk second enable maltidex 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'