本文介绍了添加FirebaseUI库和支持库时,清单合并失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Google Firebase实施身份验证.我收到此错误.如果可能的话,请有人提出解决方案并附上解释,以便我理解.
I am implementing authentication using google firebase. I am getting this error . If possible please someone suggest solution along with explanation so i can understand.
下面是我的gradle文件
Below is my gradle files
1.project模块
1.project module
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
2,模块应用
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.prerak.final_audio_streamer"
minSdkVersion 19
targetSdkVersion 26
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(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-ads:11.4.0'//advertisements
compile 'com.firebaseui:firebase-ui-auth:2.4.0'// FirebaseUI Auth only
compile'com.google.firebase:firebase-auth:11.4.0'//firebase auth
compile 'com.google.android.gms:play-services:11.4.0'//playservice
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
推荐答案
您可以在官方文档:
对于Auth,您必须在build.gradle
中添加以下行:
For Auth you have to add these lines in your build.gradle
:
compile "com.android.support:design:26.1.0"
compile 'com.android.support:appcompat-v7:26.1.0'
compile "com.android.support:customtabs:26.1.0"
compile "com.android.support:cardview-v7:26.1.0"
这篇关于添加FirebaseUI库和支持库时,清单合并失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!