There is no static zzb method - when the user of the database database and facebook database

when using facebook, the set is only for the firebase database, both work fine, but when I use both at the same time in the project, it gives an error -

java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzac; or its super classes (declaration of 'com.google.android.gms.common.internal.zzac' appears in /data/app/com.neccargo-2/split_lib_dependencies_apk.apk:classes14.dex)

I use dependencies -

compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:recyclerview-v7:26.+'
    compile 'com.android.support:cardview-v7:26.+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.facebook.android:account-kit-sdk:4.+'
    compile 'com.karumi:dexter:4.1.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
    compile 'com.wdullaer:materialdatetimepicker:2.3.0'
    compile 'com.jakewharton:butterknife:8.7.0'
    compile 'com.flaviofaria:kenburnsview:1.0.7'
    compile 'com.google.firebase:firebase-database:10.0.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
}

apply plugin: 'com.google.gms.google-services'

I am stuck to find a solution.

+6
source share
2 answers

Try adding the base firebase library.

compile 'com.google.firebase:firebase-core:10.0.1'
+1
source

I find my solution after many failures. The dependencies use those -

compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:11.0.1'

and then add multiDexEnabled trueinbuild.gradle

then add this line to buildscript-

classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.google.firebase:firebase-plugins:1.0.4'

there also add in allprojects-

maven { 
   url "https://maven.google.com" 
}

, -

public class AppUtils extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        FirebaseApp.initializeApp(getApplicationContext());
    }
}

AndroidManifest, -

android:name=".AppUtils"

.

0

All Articles