我已将compileSDK更新为28
,并已将所有依赖项更新为版本28.0.0
。但是我对implementation 'com.android.support:appcompat-v7:28.0.0'
有疑问。它说我有这个库的两个版本,28.0.0
和26.1.0
。我已经逐一注释掉了我的自定义库,并且在构建后仍然说我有两个版本。
如何解决此问题?
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.appID"
minSdkVersion 22
targetSdkVersion 28
versionCode 2
versionName "0.8.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
google()
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
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 "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
//glide
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
//keyboardVisibilityPlugin
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
//swipeRevealLayout
implementation 'com.chauthai.swipereveallayout:swipe-reveal-layout:1.4.1'
//GoogleMaps
implementation 'com.google.android.gms:play-services-maps:16.0.0'
}
答案 0 :(得分:0)
使用命令my-packagename.workermanager-init
(在项目中WorkerManagerInitializer
的文件夹中),它将打印依赖树。
当您发现某些冲突依赖性时,请排除
gradlew app:dependencies
您可以不检查冲突库就将其排除在外。
gradlew