안드로이드 스튜디오 기본템플릿도 오류 뜨는거 미치겠네...
익명(112.152)
2023-08-25 20:27
추천 0
기본으로 제공하는 템플릿들 다 오류뜨는거 돌겠음 ㅠㅠ
안드로이드 스튜디오,gradle 다 최신버전인데
그냥 아무것고 안건드리고 run하면
api 34 버전아니라고 오류떠서 다 수정해도
(34버전 필요하다면서 왜 코드에 기본설정이 33으로 되어있는지도 모르겠음)
종속성오류뜨고
error 내용
4 issues were found when checking AAR metadata:
1. Dependency 'androidx.navigation:navigation-common:2.7.1' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.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
compileSdk of at least 34.
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.navigation:navigation-runtime:2.7.1' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.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
compileSdk of at least 34.
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).
3. Dependency 'androidx.navigation:navigation-fragment:2.7.1' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.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
compileSdk of at least 34.
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).
4. Dependency 'androidx.navigation:navigation-ui:2.7.1' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.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
compileSdk of at least 34.
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).
이렇게 떠서 gpt 써서
build.gradle에서
targetSdkVersuon 34로 수정하고 런함
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules kotlin-stdlib-1.8.22 (org.jetbrains.kotlin:kotlin-stdlib:1.8.22) and kotlin-stdlib-jdk8-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules kotlin-stdlib-1.8.22 (org.jetbrains.kotlin:kotlin-stdlib:1.8.22) and kotlin-stdlib-jdk7-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21) Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations$ReflectSdkVersion found in modules kotlin-stdlib-1.8.22 (org.jetbrains.kotlin:kotlin-stdlib:1.8.22) and kotlin-stdlib-jdk7-1.6.21 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21)
(밑으로 비슷한내용들 쫘르륵나옴)
어떤 오류?
글 수정했어
앱 모듈 build.gradle에서 dependencies에 org.jetbrains.kotlin:kotlin-stdlib 있으면 지워봐
찾아봤는데 dependencies에 그런건없네 ㅠ
새 프로젝트 만들어서 다시 실행하니까 이번엔 Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction 오류 뜨는데 보통 다른사람들은 기본탬플릿 실행하면 그냥 제대로 실행되지? 난 왜 처음부터 이상한거야..? 다시까는게났나 이러면?
File > Invalidate Caches/Restart... 하고 다시 빌드해봐
런! 뜨 뜨드드드드드ㅡ드드드드드드드드드드 뜨 드드드드드드뜨드드드드드드ㅡ뜨드