下面的图像显示添加firebase auth依赖性
后显示错误在添加Fire Base Auth依赖性之前,它的工作正常。添加firebase auth依赖性后,如下所示。>
apply plugin: 'com.android.application'
repositories {
mavenLocal()
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'
//adding firebase database
compile 'com.google.firebase:firebase-database:11.6.0'
// FirebaseUI for Firebase Realtime Database
compile 'com.firebaseui:firebase-ui-database:3.1.0'
// FirebaseUI for Cloud Firestore
compile 'com.firebaseui:firebase-ui-firestore:3.1.0'
// FirebaseUI for Firebase Auth
compile 'com.google.firebase:firebase-auth:11.6.0'
}
apply plugin: 'com.google.gms.google-services'
这不是firebase issuse。出现在您的LogCat中的Failed to crunch
文件意味着Android Studio无法处理文件。它的路径太长,已经达到了操作系统的最大文件路径线。
要解决这个问题,需要尽可能简短。它肯定会解决此错误。我建议您有这样的东西:
D:ResourcesFirebase-WeekendProject
另一种方法是更改build.gradle文件(项目)中项目的构建目录:
allprojects {
buildDir = "C:/tmp/${rootProject.name}/${project.name}"
//other lines
}