更新后我遇到了这个问题,我将compileSdk版本从27更改为28.当compileSdk版本为27时,它可以正常工作。
我已经阅读了这篇帖子All com.android.support libraries must use the exact same version specification,但没有找到解决方案。我也使缓存/重启无效。
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.shafiq.asifa.taleemforalll"
minSdkVersion 19
targetSdkVersion 28
versionCode 2
versionName "2.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:28.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.android.gms:play-services-ads:11.0.4'
compile 'com.android.support:design:28.0.0'
testCompile 'junit:junit:4.12'
}
应用插件:“ com.google.gms.google-services”
当我同步项目时收到此错误。当我的CompileSdk版本为27时,项目运行正常,显示找到版本25,但我没有使用版本25的任何库