ERROR: Failed to resolve: androidx.legacy:legacy-support-v4
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'
迁移到 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'