从我的Android项目中删除Firebase

时间:2017-07-12 14:36:12

标签: android

我的Android监视器中总是出现此错误:

07-12 20:30:38.846 2318-2318/? A/FirebaseApp: Firebase API initialization failure.
                                          java.lang.reflect.InvocationTargetException
                                              at java.lang.reflect.Method.invoke(Native Method)
                                              at java.lang.reflect.Method.invoke(Method.java:372)
                                              at com.google.firebase.FirebaseApp.zza(Unknown Source)
                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
                                              at com.google.firebase.FirebaseApp.zzek(Unknown Source)
                                              at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1737)
                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1712)
                                              at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
                                              at android.app.ActivityThread.installProvider(ActivityThread.java:6397)
                                              at android.app.ActivityThread.installContentProviders(ActivityThread.java:5992)
                                              at com.qihoo.util.StubApp1008019659.interface8(Native Method)
                                              at com.qihoo.util.StubApp1008019659.attachBaseContext(StubApp1008019659.java:221)
                                              at android.app.Application.attach(Application.java:205)
                                              at android.app.Instrumentation.newApplication(Instrumentation.java:1005)
                                              at android.app.Instrumentation.newApplication(Instrumentation.java:989)
                                              at android.app.LoadedApk.makeApplication(LoadedApk.java:659)
                                              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5924)
                                              at android.app.ActivityThread.access$1700(ActivityThread.java:197)
                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1717)
                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                              at android.os.Looper.loop(Looper.java:145)
                                              at android.app.ActivityThread.main(ActivityThread.java:6856)
                                              at java.lang.reflect.Method.invoke(Native Method)
                                              at java.lang.reflect.Method.invoke(Method.java:372)
                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
                                           Caused by: java.lang.NoSuchMethodError: No static method zzz(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.fotoable.coolart/.jiagu/classes.dex)
                                              at com.google.android.gms.measurement.internal.zzx.zzbd(Unknown Source)
                                              at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source)
                                              at java.lang.reflect.Method.invoke(Native Method) 
                                              at java.lang.reflect.Method.invoke(Method.java:372) 
                                              at com.google.firebase.FirebaseApp.zza(Unknown Source) 
                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                              at com.google.firebase.FirebaseApp.initializeApp(Unknown Source) 
                                              at com.google.firebase.FirebaseApp.zzek(Unknown Source) 
                                              at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source) 
                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1737) 
                                              at android.content.ContentProvider.attachInfo(ContentProvider.java:1712) 
                                              at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
                                              at android.app.ActivityThread.installProvider(ActivityThread.java:6397) 
                                              at android.app.ActivityThread.installContentProviders(ActivityThread.java:5992) 
                                              at com.qihoo.util.StubApp1008019659.interface8(Native Method) 
                                              at com.qihoo.util.StubApp1008019659.attachBaseContext(StubApp1008019659.java:221) 
                                              at android.app.Application.attach(Application.java:205) 
                                              at android.app.Instrumentation.newApplication(Instrumentation.java:1005) 
                                              at android.app.Instrumentation.newApplication(Instrumentation.java:989) 
                                              at android.app.LoadedApk.makeApplication(LoadedApk.java:659) 
                                              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5924) 
                                              at android.app.ActivityThread.access$1700(ActivityThread.java:197) 
                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1717) 
                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                              at android.os.Looper.loop(Looper.java:145) 
                                              at android.app.ActivityThread.main(ActivityThread.java:6856) 
                                              at java.lang.reflect.Method.invoke(Native Method) 
                                              at java.lang.reflect.Method.invoke(Method.java:372) 
                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) 
                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 

我已从我的build.gradle中删除了google服务,所有编译的google-services以及Firebase。还删除了google-services.json文件,但我仍然收到此错误。

我的Manifest上没有任何Firebase Service类或Google / Firebase的任何内容。

这是我的应用级Gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "com.mydomain.myapplication"
        minSdkVersion 21
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven {
        url "http://dl.bintray.com/lukaville/maven"
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven {
            url "https://maven.google.com"
        }
    }
}

configurations {
    all*.exclude group: 'com.google.firebase', module: 'firebase-core'
    all*.exclude group: 'com.google.firebase', module: 'firebase-iid'
}

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.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.squareup.okhttp3:okhttp:3.6.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.curioustechizen.android-ago:library:1.3.2'
    compile 'com.android.support:design:25.4.0'
    compile 'com.android.support:customtabs:25.4.0'
    compile 'com.android.support:cardview-v7:25.4.0'
    compile 'com.android.support:support-v4:25.4.0'
    compile 'com.android.support:appcompat-v7:25.4.0'
    testCompile 'junit:junit:4.12'
}

我做错了什么?如何从我的应用程序中完全删除Firebase?

1 个答案:

答案 0 :(得分:0)