Jos*_*e Q 5 android google-maps firebase google-play-services firebaseui
在我使用firebase,firebase-ui,google maps等的应用程序中,它运行良好。我想更新到每个库的最新版本并安装Firebase Performance。
我得到的错误是:
error: cannot access InternalTokenProvider
class file for com.google.firebase.internal.InternalTokenProvider not found
Run Code Online (Sandbox Code Playgroud)
当我单击此错误时,它会将我发送到活动的这一行:
auth = FirebaseAuth.getInstance();
Run Code Online (Sandbox Code Playgroud)
这是我的build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
android {
signingConfigs {
release {
//signin things
}
}
compileSdkVersion 28
defaultConfig {
applicationId "app.example.asd"
minSdkVersion 21
targetSdkVersion 28
versionCode 22
versionName "2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
signingConfig signingConfigs.release
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.firebase:firebase-perf:17.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation "com.google.firebase:firebase-auth:16.0.1"
implementation 'com.firebaseui:firebase-ui:4.3.2'
implementation 'com.facebook.android:facebook-login:4.42.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-base:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.android.gms:play-services-places:16.1.0'
implementation 'com.google.firebase:firebase-inappmessaging-display:17.1.1'
implementation 'com.facebook.android:facebook-share:4.42.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
//kt y rxjava
implementation 'androidx.core:core-ktx:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.5@aar'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.0'
//lib en kt
}
repositories {
mavenCentral()
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
谁能查出我的依赖项中的问题所在?谢谢
更新 在Peter的帮助下,我得以纠正错误,将其从firebase-auth:16.0.1更改为firebase-auth:17.0.0。
现在,当我安装并打开应用程序时遇到另一个错误,就是这样:
java.lang.RuntimeException: Uncaught exception in Firebase Database runloop (3.0.0). Please report to firebase-database-client@google.com
at com.google.firebase.database.android.AndroidPlatform$1$1.run(com.google.firebase:firebase-database@@16.0.5:98)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp$IdTokenListener;
Run Code Online (Sandbox Code Playgroud)
该错误在我第一次在我的应用中使用此行时出现:
myRef = FirebaseDatabase.getInstance().getReference();
Run Code Online (Sandbox Code Playgroud)
似乎您是com.google.firebase:firebase-database:16.0.5通过com.firebaseui:firebase-ui:4.3.2(https://github.com/firebase/FirebaseUI-Android/releases/tag/4.3.2)上的依赖项来获取信息的
尝试将其添加到您的build.gradle:
implementation 'com.google.firebase:firebase-database:17.0.0'
Run Code Online (Sandbox Code Playgroud)
另外,通常请检查您使用的是最新版本,该版本可在https://firebase.google.com/docs/android/setup#available-libraries中找到
注意:这是基于从firebase-auth:16.0.1更改为firebase-auth:17.0.0之后更新中的新错误
改变这个:
implementation 'com.google.firebase:firebase-auth:16.0.1'
Run Code Online (Sandbox Code Playgroud)
进入这个:
implementation 'com.google.firebase:firebase-auth:17.0.0'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7062 次 |
| 最近记录: |