我正在尝试使用架构组件中的WorkManager.我已将compileSdkVersion和targetSdkVersion从27升级到28. gradle sync已成功完成.但是构建时错误不断涌现.由于'android.support:design',android.support库使用的是版本28.0.0-rc02.
我试图添加packagingOptions以排除'proguard/androidx-annotations.pro'.但它没有帮助.但是这次我得到了一个不同的错误信息:
Program type already present: com.google.common.util.concurrent.ListenableFuture
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚出了什么问题.
的build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.apps.test"
minSdkVersion 16
targetSdkVersion 28
versionCode 5
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "bool", "enableFirebase", "true"
}
debug {
minifyEnabled false
resValue "bool", "enableFirebase", "false"
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], …Run Code Online (Sandbox Code Playgroud) android kotlin android-architecture-components android-ktx android-workmanager