gpt4 book ai didi

java - 与依赖冲突 : build. gradle

转载 作者:太空宇宙 更新时间:2023-11-04 10:26:53 28 4
gpt4 key购买 nike

我添加了一个新的依赖项

compile 'com.github.markomilos:paginate:0.5.1'

但是同步构建后,出现错误

"Conflict with dependency com.android.support:support-annotations'"

这是我的 build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.formation.mvpnewproject"
minSdkVersion 17
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 {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.constraint:constraint-layout:1.1.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 'com.google.code.gson:gson:2.8.1'

implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0'
compile 'com.github.markomilos:paginate:0.5.1'

}

a screenshot on the error message

谢谢。

最佳答案

添加android测试依赖

androidTestImplementation 'com.android.support:support-annotations:27.1.1'

并用实现替换编译

实现“com.github.markomilos:paginate:0.5.1”

因为编译配置现已弃用,应由实现或 api 替换,以获取有关 read this answer 的更多信息

关于java - 与依赖冲突 : build. gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50437079/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com