我在这里制作食品配送应用程序是我面临的错误,请帮助我摆脱它。
块引用 (ZygoteInit.java:1120)
05-05 10:31:37.666 25756-25791/com.example.lenovo.laundry D/FA: Logging event (FE): app_exception(_ae), Bundle[{firebase_event_origin(_o)=crash, timestamp=1525496497673, fatal=1}]
05-05 10:31:37.906 25756-25756/com.example.lenovo.laundry E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.lenovo.laundry, PID: 25756
java.lang.NoSuchMethodError: No virtual method zzUU()Z in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in /data/app/com.example.lenovo.laundry-1/base.apk)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.lenovo.laundry.home.onCreate(home.java:46)
at android.app.Activity.performCreate(Activity.java:6904)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
at android.app.ActivityThread.access$1100(ActivityThread.java:229)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Native Method)
gradle代码(app)
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
compile 'com.google.firebase:firebase-core:15.0.2'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.google.firebase:firebase-auth:15.1.0'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.firebase:firebase-crash:15.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
//compile 'com.android.support:customtabs:27.1.0'
//compile 'com.google.android.gms:play-services-base:15.0.1'
//compile 'com.google.android.gms:play-services-gcm:15.0.1'
}
apply plugin: 'com.google.gms.google-services'
请帮帮我....
答案 0 :(得分:0)
要解决此问题,请更改以下代码行:
compile 'com.firebaseui:firebase-ui-database:1.2.0'
到
compile 'com.firebaseui:firebase-ui-database:3.3.1'
请参阅here FirebaseUI和Firebase / Play服务版本之间的兼容性。