\android\build.gradle 아래 코드에서 버전을 맞게 수정하였다. (+코틀린 버전도 알맞게 수정)
buildscript {
ext.kotlin_version = '1.6.10' //1.3.50
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0' //4.1.0
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
아래 답변을 참고하여 해결되었다.
You must be using a JDK version that is not supported by the Gradle Version. ( There is no need to downgrade )
1-Check your JDK Version from C:\Program Files\Java. In My Case, It's JDK-17.0.2
2-Check The Respective Gradle version for your JDK https://docs.gradle.org/current/userguide/compatibility.html
3-Open gradle-wrapper.properties from .\android\gradle\wrapper\
and change the distributionUrl to your required gradle version
e.g. for JDK 17
distributionUrl = https\://services.gradle.org/distributions/gradle-7.3-all.zip
4-Open build.gradle from .\android\build.gradle
and change the plugin in the class path to the one according to your gradle version
e.g.
classpath("com.android.tools.build:gradle:4.2.2") for Gradle 6.7.1+
classpath("com.android.tools.build:gradle:7.0.0") for Gradle 7+
Check the Compatible Plugin for your Gradle version at https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
5-run npx react-native run-android
How to fix the ''module java.base does not "opens java.io" to unnamed module '' error in Android Studio?
How to fix the ''module java.base does not "opens java.io" to unnamed module '' error in Android Studio?
Background I started my first project in android studio to get familiar with Android programming. I am following this tutorial, in which I created a new project Empty Activity, without any change...
stackoverflow.com
'Flutter' 카테고리의 다른 글
[Flutter] 에러해결 - private final java.lang.String java.io.File.path, INSTALL_FAILED_INSUFFICIENT_STORAGE (2) | 2023.11.06 |
---|---|
[Flutter] 우리 처음 만난 날 U&I 프로젝트 (Font 적용하기, DatePicker, 날짜 다루기, 테마 적용하기) (0) | 2023.11.06 |
[Flutter] DateTime 및 Duration 이론 실습 (0) | 2023.10.16 |
[Flutter] 전자액자 프로젝트 (PageView, Timer, PageController) (1) | 2023.10.16 |
[Flutter] StatefulWidget 이론 (0) | 2023.10.12 |