![](/img/trans.png)
[英]Flutter Android Studio Failed to resolve: androidx.legacy:legacy-support-v4:27.0.1 error
[英]ERROR: Failed to resolve: androidx.legacy:legacy-support-v4
迁移到 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'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.