gpt4 book ai didi

android - 错误 : Failed to resolve: androidx. 旧版:legacy-support-v4

转载 作者:行者123 更新时间:2023-11-29 00:52:50 31 4
gpt4 key购买 nike

迁移到 androidx 后,此错误一直显示,有人可以帮助我吗?

这是build.gradle的一部分


buildscript {
repositories {
google()
maven {
url 'https://maven.google.com'
}
jcenter()


}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
maven {
url 'https://maven.google.com'
}
jcenter()

}
}

这是 build.gradle(app) 中的依赖列表

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'androidx.legacy:legacy-support-v4'
//implementation 'androidx.legacy:legacy-support-v13'
testImplementation 'junit:junit:4.12'

androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
}

这是我尝试同步项目时的单行错误

ERROR: Failed to resolve: androidx.legacy:legacy-support-v4:
Affected Modules: app

最佳答案

使用

implementation 'androidx.legacy:legacy-support-v4:1.0.0'

代替

implementation 'androidx.legacy:legacy-support-v4'

关于android - 错误 : Failed to resolve: androidx. 旧版:legacy-support-v4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57778013/

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