error when start scanning
hi
can you tell what is causing this error
java.lang.NoSuchMethodError: No static method zzC(Ljava/lang/Object;)Lcom/google/android/gms/dynamic/zzd; in class Lcom/google/android/gms/dynamic/zze; or its super classes (declaration of 'com.google.android.gms.dynamic.zze' appears in /data/app/com.richard.myvansales-2/split_lib_dependencies_apk.apk:classes18.dex)
at com.google.android.gms.vision.barcode.internal.client.zzd$zza.zzb(Unknown Source)
at com.google.android.gms.vision.barcode.internal.client.zzd$zza.zza(Unknown Source)
at com.google.android.gms.vision.barcode.internal.client.zzd.zzIg(Unknown Source)
at com.google.android.gms.vision.barcode.internal.client.zzd.
my gradle: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') //compile files('libs/mpandroidchartlibrary-2-1-6.jar') //Animation //compile 'com.google.android.gms:play-services-ads:8.3.0' //compile 'com.android.support:design:23.1.1 //compile files('libs/common-lang3.jar') //compile files('libs/httpclient-4.5.1.jar') //compile 'com.loopj.android:android-async-http:1.4.9' //compile files('libs/activation.jar') // compile files('libs/additionnal.jar') //compile files('libs/android-async-http-1.4.9.jar') //compile 'com.google.android.gms:play-services-ads:9.2.0' compile files('libs/commons-net-3.5.jar') compile project(':module') //compile project(':materialbarcodescanner') //compile 'com.google.android.gms:play-services-map:9.4.0' //httpok //multidex compile 'com.android.support:appcompat-v7:24.2.0' compile 'com.google.android.gms:play-services-maps:9.4.0' compile 'com.google.maps.android:android-maps-utils:0.4.+' compile 'com.google.android.gms:play-services-location:9.4.0' compile 'com.google.android.gms:play-services-drive:9.4.0' compile 'com.google.android.gms:play-services-auth:9.4.0' compile 'com.google.android.gms:play-services-gcm:9.4.0' compile 'com.android.support:cardview-v7:24.2.0' compile 'com.android.support:design:24.2.0' compile 'de.hdodenhof:circleimageview:1.2.1' compile 'com.android.support:recyclerview-v7:24.2.0' compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2' compile 'com.nineoldandroids:library:2.4.0' compile 'com.daimajia.easing:library:1.0.1@aar' compile 'com.daimajia.androidanimations:library:1.1.3@aar' compile 'au.com.bytecode:opencsv:2.4' compile 'com.loopj.android:android-async-http:1.4.6' compile 'com.mcxiaoke.volley:library-aar:1.0.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.google.firebase:firebase-messaging:9.4.0' compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'com.squareup.okio:okio:1.8.0' compile 'com.android.support:multidex:1.0.1' compile 'com.android.support:support-v4:24.2.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' //barcode compile 'com.edwardvanraak:MaterialBarcodeScanner:0.0.6-ALPHA' testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services'
Hey Try to add this
compile 'com.android.support:appcompat-v7:~~Your Version~~ compile 'com.google.android.gms:play-services-basement:~~Your Version~~ compile 'com.google.android.gms:play-services-vision:~~Your Version~~ compile 'com.android.support:design:~~Your Version~~ compile 'com.android.support:support-annotations:~~Your Version~~
I got a similar error... It was because I added google services latest version plugin that caused the BarcodeScanner to crash I then reverted all google play service dependencies to a previous version i.e. from 10.0.1 to 9.0.0
Advise : Try to add google vision dependency always, to use this scanner
My build.gradle(before) compile 'com.google.firebase:firebase-database10.0.1' compile 'com.google.firebase:firebase-messaging:10.0.1' compile 'com.google.android.gms:play-services-vision:10.0.1'
My build.gradle (after) compile 'com.google.firebase:firebase-database:9.0.0' compile 'com.google.firebase:firebase-messaging:9.0.0' compile 'com.google.android.gms:play-services-vision:9.0.0'
Now it works fine...