Оле*_*дев 6 java android firebase
UPD.我已阅读这些问题和答案(未找到com.google.android.gms.internal.zzaja的类文件).但我不明白我需要在项目中添加或删除哪些字符串.因为我的代码中没有这个和其他字符串:编译'com.google.android.gms:play-services-location:9.2.0'
我开发了一个使用FireBase的Android应用程序.当我想构建我的项目时,我有一个错误:
错误:(39,25)错误:无法访问com.google.android.gms.internal.zzanb找不到zzanb类文件
该错误是由调用语句引起的:FirebaseAuth.getInstance().getCurrentUser();
项目build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
模块build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "xxx.yyy.zzz"
minSdkVersion 19
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'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.1.0'
compile 'com.firebaseui:firebase-ui:0.6.0'
compile 'com.android.support.test.espresso:espresso-core:2.2.2'
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
请帮我解决一下这个错误)
PS我已经读过这个问题(Firebase Error在使用play-services-xxx之后无法访问zzanb:9.8.00),但我不明白,在我的情况下我需要添加或删除我的build.gradle文件.
您正在混合发布的新旧Firebase库.您使用的Firebase中的所有内容都应该是平价的.这一行引用了一个非常古老的Firebase版本的库(在它成为Google的Firebase平台之前):
compile 'com.firebaseui:firebase-ui:0.6.0'
Run Code Online (Sandbox Code Playgroud)
如果要使用Firebase-UI库,则应使用与您正在使用的主客户端库版本匹配的新版本.你正在使用10.0.1,所以根据我刚刚链接的Firebase-UI github上的表,你想要这个依赖:
compile 'com.firebaseui:firebase-ui:1.1.1'
Run Code Online (Sandbox Code Playgroud)
始终确保您的Firebase-UI库与您正在使用的核心Firebase SDK相匹配.
| 归档时间: |
|
| 查看次数: |
25316 次 |
| 最近记录: |