【发布时间】:2019-04-01 09:08:52
【问题描述】:
所以,我刚刚创建了一个新项目,在添加任何新库或任何东西之前,我刚刚添加了 firebase 库,一旦我同步了 gradle,它就会给我一个错误,说混合 android 库会导致 appcompat 出现问题图书馆。
我在这里做错了什么?为什么我会收到这个错误,我该如何摆脱它?
这是我的 gradle 文件的源代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.femindharamshi.codifyadmin"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
} }
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.4'
}
apply plugin: 'com.google.gms.google-services'
【问题讨论】:
标签: android gradle error-handling libraries mixing