2017-08-27 4 views
6

जब फेसबुक का उपयोग करते हुए, firebase-डेटाबेस खाते अकेले दोनों अच्छा काम लेकिन जब मैं दोनों एक परियोजना में एक ही समय में उपयोग कर रहा हूँ किट दे त्रुटि-कोई स्थिर विधि zzb - जब उपयोगकर्ता firebase-डेटाबेस और फेसबुक खाता किट

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)

मैं

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:[email protected]' 
    compile 'fr.avianey.com.viewpagerindicator:library:[email protected]' 
    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' 

dependencies- उपयोग कर रहा हूँ मैं अटक के बारे में समाधान खोजने के लिए कर रहा हूँ।

+0

क्या आपको इस समस्या का समाधान मिला? –

+0

हाँ, मैं नीचे जवाब देता हूं। कृपया जांचें। –

उत्तर

1

फ़ायरबेस कोर लाइब्रेरी जोड़ने का प्रयास करें।

compile 'com.google.firebase:firebase-core:10.0.1' 
+0

काम नहीं करता है, यह अभी भी एक ही त्रुटि है। –

0

मुझे कई विफलताओं के बाद मेरा समाधान मिल गया। निर्भरता में उन का उपयोग करें -

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' 

और फिर build.gradle

में multiDexEnabled true जोड़ने तो buildscript में उन पंक्ति जोड़ें -

maven { 
    url "https://maven.google.com" 
} 
- वहाँ में

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

भी allprojects में जोड़ने

फिर एक वर्ग की तरह बना सकते हैं -

public class AppUtils extends Application { 

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

जैसे

android:name=".AppUtils" 

प्रक्रिया मुझे लगता है कि समस्या को दूर है कि AndroidManifest में इस वर्ग के नाम जोड़ें।

संबंधित मुद्दे