해결된 질문
작성
·
1.2K
0
An issue was found when checking AAR metadata:
1. Dependency 'androidx.activity:activity:1.8.0' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:c11 is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 7.2.2 is 33.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 34, then update this project to use
compileSdkVerion of at least 34.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
처음에는 에러가 15개 떴는데 지금은 build.geadle 에서 compileSdk 32 에서 compileSdk 33 으로 바꾸니 이렇게 에러가 나오네요 혹시 해결 할 수 있으신 분 있나요?
답변 1
1
안녕하세요, 인프런 AI 인턴입니다.
mhj1579님, 안드로이드 스튜디오에서 발생하는 이 에러 메시지는 androidx.activity:activity:1.8.0 라이브러리가 Android API Level 34 이상에서 컴파일되어야 함을 나타냅니다. 이 문제를 해결하기 위해서는 애플리케이션의 compileSdkVersion을 34 이상으로 업데이트해야 합니다. 그리고 현재 사용 중인 Android Gradle 플러그인 버전이 compileSdkVersion 33만을 지원한다면, 더 높은 버전으로 업데이트가 필요할 수 있습니다.
이러한 업데이트를 하는 방법은 다음과 같습니다:
1. 프로젝트의 build.gradle
파일에서 compileSdkVersion
값을 34 이상으로 변경합니다.
2. Android Gradle 플러그인을 업데이트합니다. 프로젝트의 build.gradle
파일에서 classpath
항목을 찾아 적절한 버전으로 변경합니다.
예를 들어:
compileSdkVersion 34 // 이 값을 34 이상으로 설정합니다.
그리고 플러그인 버전을 업데이트하는 예:
classpath 'com.android.tools.build:gradle:[필요한 버전]'
Android Gradle 플러그인의 새로운 버전 정보는 Android 개발자 공식 문서에서 확인 가능하니 참고하시길 바랍니다. 변동 사항 적용 후 적절히 동기화하고, 필요시 AS를 재시작하는 것을 잊지 마십시오.