[안드로이드 스튜디오]안드로이드 앱만들기 - 샘플코드로 앱만들기 썬플라워(sunflower)
[안드로이드 스튜디오]안드로이드 앱만들기 - 샘플코드로 앱만들기 썬플라워(sunflower)
썬플라워 앱
https://developer.android.com/codelabs/kotlin-android-training-available-resources?hl=ko#3
Android Kotlin Fundamentals 01.4: Learn to help yourself | Android Developers
In this codelab, you add a launcher icon to an app, and you learn where to find Kotlin and Android developer information and resources.
developer.android.com
1. 파일 다운로드 후 오류가 발생해서 앱런치가 안됨
=> Failed to apply plugin [id 'com.android.application'] 오류 발생
=> 안드로이드 프로젝트 파일 경로에 한글이 들어가서 오류 발생,
영어로 된 경로를 만들어서 프로젝트 폴더를 옮겨준뒤 다시 프로젝트 로드를 하니 문제 해결됨
2. 두번째 오류, Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
=> 안드로이드 스튜디오의 버전이 올라가면서 build.gradle 파일에서 사용되는 "com.android.tools.build:gradle" 버전이 올라감.
여기에 속해있는 "com.android.application" 플러그인이 java11을 필요로 하는데 설정이 java11로 안되있어서 오류발생
windows :: File > setting > Build, Execution, Deployment > Build Tools > Gradle 에서 Gradle JDK 값을 11로 변경
mac :: Android Studio > Preference > Build, Execution, Deployment > Build Tools > Gradle 에서 Gradle JDK 값을 11로 변경
JDK11이 없으면 다운로드 후 사용(라이센스 확인)
이후 정상적으로 앱 실행됨