java.lang.NoSuchMethodError:没有虚方法zzait()Ljava / util / ArrayList;在类Lcom /错误? [英] java.lang.NoSuchMethodError: No virtual method zzait()Ljava/util/ArrayList; in class Lcom/ Error?

查看:838
本文介绍了java.lang.NoSuchMethodError:没有虚方法zzait()Ljava / util / ArrayList;在类Lcom /错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习从Udacity课程使用Firebase。
当我运行我的应用程序,并没有线索时,我得到了这个错误。
11-23 16:48:34.995 3947-3947 / com.google.firebase.udacity.friendlychat

  E / AndroidRuntime:FATAL EXCEPTION:main 
进程:com.google.firebase.udacity.friendlychat,PID:3841
java.lang.NoSuchMethodError:没有虚方法zzait()Ljava / util / ArrayList;类Lcom / google / android / gms / auth / api / signin / GoogleSignInOptions中的
;
或其超类(com.google.android.gms.auth.api.signin.GoogleSignInOptions声明出现在/data/data/com.google.firebase.udacity.friendlychat/files/.jrebel/ load-dexes / bundle12 / libraries24.zip)
在com.google.android.gms.auth.api.Auth $ 3.zza(未知来源)
在com.google.android.gms.auth。 api.Auth $ 3.zzp(未知源代码)
,位于com.google.android.gms.common.api.GoogleApiClient $ Builder.addApi(未知源代码)
,位于com.firebase.ui.auth.util .CredentialsAPI.initGoogleApiClient(CredentialsAPI.java:147)
位于com.firebase.ui.auth.util.CredentialsAPI。< init>(CredentialsAPI.java:65)
位于com.firebase.ui。 (android.app.Activity.performCreate(Activity.java:6100))
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1112)at com.zeroturnaround.jrebel.android.agent.JRebelInstrumentation.callActivityOnCreate(SourceFile:93)
at and在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601)
在android.app.ActivityThread.access $ b $(ActivityThread.java)
(ActivityThread.java:2468) :178)
at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
在android。 os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
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:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
11-23 16:48:35.176 3947-3975 / com.google.firebase.udacity.friendlychatE / GED:未能获得GED Log Buf,err(0)

任何人都可以帮我吗?

UPDATE build.gradle

  apply plugin: com.android.application'

repositories {
mavenLocal()
maven {url'https://maven.fabric.io/public'}
flatDir {
dirs'libs'
}
}

android {
compileSdkVersion 24
buildToolsVersion24.0.1

defaultConfig {
applicationIdcom.google.firebase.udacity.friendlychat
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}

packagingOptions
排除'META-INF / LICENSE'
排除'META-INF / LICENSE-FIREBASE.txt'
排除'META-INF / NOTICE'



依赖{
编译fileTree(dir:'libs',inc lude:['* .jar'])
testCompile'junit:junit:4.12'

compile'c​​om.android.support:design:24.2.0'
compile' com.android.support:appcompat-v7:24.2.0'

//显示图片
compile'c​​om.github.bumptech.glide:glide:3.6.1'
// Firebase
编译'com.google.firebase:firebase-database:10.0.0'
编译'com.firebaseui:firebase-ui-database:1.0.0'

// FirebaseUI Auth只有
编译'com.firebaseui:firebase-ui-auth:1.0.0'

// FirebaseUI存储只有
编译'com.firebaseui:firebase -ui-storage:1.0.0'

//包含
之上的所有FirebaseUI库的单个目标编译'com.firebaseui:firebase-ui:1.0.0'

// Firebase Auth
compile'c​​om.google.firebase:firebase-auth:10.0.0'

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


解决方案

这很可能会导致Firebase与FirebaseUI之间的版本不兼容。我遇到了同样的问题,花了30-45分钟试图弄清楚。最后,我为了继续使用Firebase in a Weekend教程所做的工作是:
$ b

git checkout 1.04-firebase-auth-firebaseui -signin



这将在本教程中的此处切换到分支。它可以正常工作。



也许不是问题的理想答案,但会让你重新学习课程。


Hi I'm learning to use Firebase from an Udacity Course. I got this error when I ran my app and have no clue about it. 11-23 16:48:34.995 3947-3947/com.google.firebase.udacity.friendlychat

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.firebase.udacity.friendlychat, PID: 3841
java.lang.NoSuchMethodError: No virtual method zzait()Ljava/util/ArrayList; 
in class Lcom/google/android/gms/auth/api/signin/GoogleSignInOptions; 
or its super classes (declaration of 'com.google.android.gms.auth.api.signin.GoogleSignInOptions' appears in /data/data/com.google.firebase.udacity.friendlychat/files/.jrebel/load-dexes/bundle12/libraries24.zip)
at com.google.android.gms.auth.api.Auth$3.zza(Unknown Source)
at com.google.android.gms.auth.api.Auth$3.zzp(Unknown Source) 
at com.google.android.gms.common.api.GoogleApiClient$Builder.addApi(Unknown Source) 
at com.firebase.ui.auth.util.CredentialsAPI.initGoogleApiClient(CredentialsAPI.java:147) 
at com.firebase.ui.auth.util.CredentialsAPI.<init>(CredentialsAPI.java:65)
at com.firebase.ui.auth.ui.ChooseAccountActivity.onCreate(ChooseAccountActivity.java:102)
at android.app.Activity.performCreate(Activity.java:6100)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)                    at com.zeroturnaround.jrebel.android.agent.JRebelInstrumentation.callActivityOnCreate(SourceFile:93)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
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:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
11-23 16:48:35.176 3947-3975/com.google.firebase.udacity.friendlychatE/GED: Failed to get GED Log Buf, err(0)

Can anyone help me?

UPDATE build.gradle

apply plugin: 'com.android.application'

repositories {
    mavenLocal()
    maven { url 'https://maven.fabric.io/public' }
    flatDir {
        dirs 'libs'
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    defaultConfig {
        applicationId "com.google.firebase.udacity.friendlychat"
        minSdkVersion 16
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE-FIREBASE.txt'
        exclude 'META-INF/NOTICE'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'

    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:appcompat-v7:24.2.0'

    // Displaying images
    compile 'com.github.bumptech.glide:glide:3.6.1'
// Firebase
    compile 'com.google.firebase:firebase-database:10.0.0'
    compile 'com.firebaseui:firebase-ui-database:1.0.0'

    // FirebaseUI Auth only
    compile 'com.firebaseui:firebase-ui-auth:1.0.0'

    // FirebaseUI Storage only
    compile 'com.firebaseui:firebase-ui-storage:1.0.0'

    // Single target that includes all FirebaseUI libraries above
    compile 'com.firebaseui:firebase-ui:1.0.0'

    // Firebase Auth
    compile 'com.google.firebase:firebase-auth:10.0.0'

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

解决方案

This is most likely do to a version incompatibility between Firebase, and FirebaseUI. I ran into the same issue, and spent 30-45 min trying to figure it out. Ultimately what I did in order to keep going with the "Firebase in a Weekend" tutorial was:

git checkout 1.04-firebase-auth-firebaseui-signin

This will switch to the branch at this point in the tutorial. It works fine after doing so.

Maybe not the ideal answer as to what the problem is, but will get you going again with the course.

这篇关于java.lang.NoSuchMethodError:没有虚方法zzait()Ljava / util / ArrayList;在类Lcom /错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆