반응형
Andrioid Studio에서 안드로이드 app 시뮬레이터 run 과정에서 compileSdk 이슈가 발생하는 경우가 있습니다.
해당 이슈를 해결하기 위해 해결방법에 대해 알려드립니다.
이슈:
2 issues were found when checking AAR metadata:
1. Dependency 'androidx.core:core:1.15.0' requires libraries and applications that
depend on it to compile against version 35 or later of the
Android APIs.
:app is currently compiled against android-34.
Recommended action: Update this project to use a newer compileSdk
of at least 35, for example 35.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
2. Dependency 'androidx.core:core-ktx:1.15.0' requires libraries and applications that
depend on it to compile against version 35 or later of the
Android APIs.
:app is currently compiled against android-34.
Recommended action: Update this project to use a newer compileSdk
of at least 35, for example 35.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
Update minCompileSdk in modules with dependencies that require a higher minCompileSdk.
해결방법:
코드에서는 문제가 없었는데, Gradle 빌드에서 compileSdk 버전 업데이트가 필요하다는 내용입니다.
안드로이드에 설치된 SDK34버전을 SDK35버전으로 업데이트하면 해결되는 이슈입니다.
1. 안드로이드 스튜디오에서 버전 업데이트 적용하는 방법
File -> Project Structure
2. Compile Sdk Version 설정
Project Structure에서 Module -> Properties 탭 -> Compile Sdk Version
Compile Sdk Version 스크롤에서API 35(SDK 최신버전 or 원하는 버전)로 선택 및 적용한 후, 안드로이드 스튜디오를 재부팅하면 됩니다.
Gradle build 관련 compileSdk 이슈 관련 해결방법을 알아보았습니다.
반응형
'앱 > Android Native' 카테고리의 다른 글
[Android] 안드로이드 프로젝트에 layout 폴더 없는 경우 해결 방법 (0) | 2025.01.18 |
---|