0

Getting error while running or debugging the project. i also tried with adding google-service.json but still getting same error. what should i have to modified in the bellow mention gradle file?

java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzaa; or its super classes (declaration of 'com.google.android.gms.common.internal.zzaa' appears in /data/data/com.android.ws/files/instant-run/dex/slice-google-play-services_1918fa0e0c3c9026850251672be728623052d2e0-classes.dex)
                                                                at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)
                                                                at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
                                                                at android.app.ActivityThread.installProvider(ActivityThread.java:5172)
                                                                at android.app.ActivityThread.installContentProviders(ActivityThread.java:4767)
                                                                at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
                                                                at android.app.ActivityThread.access$1600(ActivityThread.java:153)
                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                at android.os.Looper.loop(Looper.java:148)
                                                                at android.app.ActivityThread.main(ActivityThread.java:5441)
                                                                at java.lang.reflect.Method.invoke(Native Method)
                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

i don't understand what is missing or need to modified. my app level gradle file is:

    apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.android.ws"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    multiDexEnabled = true
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
aaptOptions {
    cruncherEnabled = false
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.journeyapps:zxing-android-embedded:3.0.2@aar'
compile 'com.google.zxing:core:3.2.0'
compile 'com.itextpdf:itext-pdfa:5.5.9'
compile 'com.android.support:support-v4:23.4.0'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.google.android.gms:play-services:9.0.0'
compile files('libs/itextpdf-5.5.4.jar')
compile files('libs/EncryptDecrypt.jar')
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.1'
android {
    useLibrary 'org.apache.http.legacy'
}
}

Thanks in advance.

chandan kumar
  • 190
  • 1
  • 15
  • 1
    i am not sure, but this looks like a version issue, like if you have a `library-A` with version 3, and `Library-B` version 6 , for some reason, library-b is using library-a, but expecting a method to be exist, but it's not, so, this could be because A is older than B, or vice versa, **bottom line** try to use latest version of all libs, start by using a newer version for play-services, ex: `10.2.1` – Yazan Apr 20 '17 at 08:24
  • 1
    see [so using-gradle-to-find-dependency-tree](http://stackoverflow.com/questions/21645071/using-gradle-to-find-dependency-tree) to find out how to analyse the kind of problem @Yazan mentioned – k3b Apr 20 '17 at 08:48

0 Answers0