Could not find any version that matches com.android.support:appcompat

또는

Failed to resolve: com.android.support:appcompat-v7:29.+


프로젝트를 생성하였더니 위와 같은 오류가 발생하는 경우가 있습니다.

dependencies {
    implementation fileTree(
dir: 'libs', include: ['*.jar'])
   
implementation 'com.android.support:appcompat-v7:29.+'
   
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
   
testImplementation 'junit:junit:4.12'
   
androidTestImplementation 'com.android.support.test:runner:1.0.2'

 

오류가 발생하는 위치는 gradle 설정 부분에 있습니다


android version match error

 

하단에 있는 오류를 텍스트로 다시 보면

Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.

Open File

Show Details

 

 

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.

Open File

Show Details

 

 

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+.

Open File

Show Details

동일한 오류의 반복 입니다.

SDK를 업데이트 해도 잘 해결이 안 되는 경우에는 개발 상황에 따라 조금씩 다르겠지만 설정 값을 조금 수정해야 합니다.

 

1. maven 추가


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

이런 식으로 maven 주소를 추가하면 해결되는 경우가 있습니다.

 

2. 버전 수정 1


implementation 'com.android.support:appcompat-v7:26.1.0'

이렇게 29를 그 아래 버전으로 수정하면 해결되는 경우도 있습니다.

 

3. 버전 수정 2


implementation 'com.android.support:appcompat-v7:+'

그냥 적합한 버전을 찾도록 합니다.


4. 그 외

 

1+ 2, 1+ 3번 이렇게 두 가지를 섞어서 테스트를 해보았는데 이것도 저에게는 오류가 사라지는 효과를 얻을 수 있었습니다.

 

- copy coding -


+ Recent posts