npm run android 프로젝트명 을 실행하니 처음에는 잘 실행되나 싶었으나 오류가 발생했습니다.
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\app\weightLog\andro id\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 29s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: D:\app\weightLog\node_modules\react-native-gradle-plugin\src\main\java\com\facebook\react\codegen\generator\SchemaJsonParser.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
.
.
.
BUILD FAILED in 3m 46s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 46s
at makeError (D:\app\weightLog\node_modules\execa\index.js:174:9)
at D:\app\weightLog\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (D:\app\weightLog\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\app\weightLog\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
Gradle 7.0.0 대 버전은 Java 11 버전을 사용해야 한다고 합니다.
Java 1.8을 Java 11로 버전업 하고 실행하면 정상적으로 실행됩니다.
'*오류해결' 카테고리의 다른 글
Execution failed for task ':react-native-gradle-plugin:compileKotlin' 오류 (0) | 2023.02.14 |
---|---|
cli.init is not a function 오류 (1) | 2023.02.12 |
java.lang.StringIndexOutOfBoundsException 오류 (0) | 2022.02.04 |
The maximum column width for an individual cell is 255 characters 오류 (1) | 2021.10.25 |
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException 오류 (1) | 2021.10.14 |
댓글