마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

minSdkVersion 설정 질문 드립니다.

0 추천

minSdkVersion 17

targetSdkVersion 27

 

이렇게 만드려고 합니다.

 

그래서 프로젝트 생성시 target SDK를 27로 주고,

프로젝트 생성 후에 gradle에가서 minSdkVersion을 17로 바꾸고 snyc를 하니,

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

에서 빨간줄이 생겨서 마우스를 대보니, 아래와 같은 오류가 뜹니다 ㅠㅠ

 

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 25.3.1. Examples include com.android.support:animated-vector-drawable:27.1.1 and com.android.support:support-media-compat:25.3.1 less... (⌘F1) 
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).  Issue id: GradleCompatible

 

 

 

25.3.1 은 언제 썼는지도 모르겠는데... 왜 저런 오류가 뜰까요??? ㅠㅠ

어차피 만들고 sdk만 건드린거지만......혹시 몰라서 dependencies 전체를 올려봅니다.

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    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'

}
떡빵s (1,370 포인트) 님이 2018년 11월 19일 질문
build sdk도 한번 확인해보세요.
sdk에 맞게 타겟, 컴파일, 앱컴팻, 빌드까지 다 맞췄는데도 그러네요 ㅠ

1개의 답변

+1 추천

아래와 비슷하게 라이브러리 버전을 지정해 보세요.. ^^ 또는 File > Invalidate Caches 하고 restart도 함 해 보세요.. ^^

 

android {
    configurations.all {
        resolutionStrategy.force "com.android.support:support-core-utils:${support_version}"
    }
}

 

 

mcsong (44,040 포인트) 님이 2018년 11월 21일 답변
아... 이것도 안되는거 같습니다 ㅠ

안드로이드 스튜디오 문제인가 싶어서 다 지웠다가 새로 설치하느라 버전을 28.0.0으로 다시 테스트 해보았는데, 알려주신 방법으로

android {
    configurations.all {
        resolutionStrategy.force "com.android.support:support-core-utils:appcompat-v7:28.0.0"
    }
}

이런식으로
animated-vector-drawable:27.1.1,
support-media-compat:25.3.1,
appcompat-v7:25.3.1
 다 넣어봤는데...

전부 Failed to resolve가 뜨면서 안되네요 ㅠㅠ
...