我正在使用 Android Studio 1.5 并尝试将 Firebase UI 库添加到我的应用程序中。
我已将其添加到我的依赖项中。
由于某种原因,我收到了 NoClassDefFoundError
异常。
我读到应该将 Firebase-UI jar 添加到我的“libs”文件夹中,但我找不到它。
有什么建议吗?
最佳答案
很可能您缺少应用的 build.gradle 中的 Google Play 服务依赖项。作为引用,这是我的一篇:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
FirebaseUI依赖 com.google.android.gms:play-services-auth:8.3.0
进行 Google 身份验证。对于所有依赖项,请参阅this section of the README .
关于android - NoClassDefFoundError : com. firebase.ui.auth.google.GoogleAuthProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34571157/