2017-08-27 15 views
6

, facebook yalnız ben bir projede aynı zamanda hem kullanıyorum zaman hem iyi çalışır ancak Firebase veritabanı hesap kiti kullanılarak o vermek hatasızHiçbir statik yöntem zzb - Kullanıcı Firebase veritabanı ve facebook hesabı kiti

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)

Ben çözüm bulmak için yaklaşık şaşırıp

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- kullanıyorum.

+0

Bu soruna çözüm buldunuz mu? –

+0

evet, cevabı aşağıda vereceğim. Lütfen kontrol edin. –

cevap

1

Firebase çekirdek kitaplığı eklemeyi deneyin.

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

çalışmıyor, hala aynı hata. –

0

Birçok hatadan sonra benim çözüm bulmak.

maven { 
    url "https://maven.google.com" 
} 
- Ayrıca allprojects eklemek orada

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

- o zaman buildscript bu satırı ekleyin build.gradle

içinde multiDexEnabled true eklemek sonra

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' 

ve - bağımlılıkları ise olanlar kullanabilir

Sonra böyle bir sınıf oluşturmak -

public class AppUtils extends Application { 

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

O sorunun üstesinden süreç

android:name=".AppUtils" 

gibi- AndroidManifest bu sınıf adını ekleyin.

İlgili konular