我现在把我的头发拖了3天。
每当我指挥<条码>活性---反应-条码>。 我发现这一错误:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:10284) Warning: Accessing non-existent property padLevels of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 871 file(s) to forward-jetify. Using 16 workers...
info JS server already running.
info Installing the app...
FAILURE: Build failed with an exception.
* What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:Program FilesJavajdk-17injava.exe
* 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
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.
* What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:Program FilesJavajdk-17injava.exe
* 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
at makeError (C:UsersusernameDesktopcodeReact NativeBuild AppScheduler
ode_modulesexecaindex.js:174:9)
at C:UsersusernameDesktopcodeReact NativeBuild AppScheduler
ode_modulesexecaindex.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (C:UsersusernameDesktopcodeReact NativeBuild AppScheduler
ode_modules@react-native-communitycli-platform-androiduildcommands
unAndroid
unOnAllDevices.js:106:5)
at async Command.handleAction (C:UsersusernameDesktopcodeReact NativeBuild AppScheduler
ode_modules
eact-native
ode_modules@react-native-communitycliuildindex.js:192:9)info Run CLI with --verbose flag for more details.
我使用基本<代码>活性内涵项目制作我的名录
My gradle is version 6.9
.androidgradlewrappergradle-wrapper.properties
=>distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip
我和海底演播室版本为Androidosphere 2020.3.1
。
我的java版本为15
C:Usersusername>java -version
java version "15" 2020-09-15
Java(TM) SE Runtime Environment (build 15+36-1562)
Java HotSpot(TM) 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)
C:Usersusername>javac -version
javac 15
我正在考虑使用java 17,但在
A Java version between 8 and 15 is required to execute Gradle. Java 16
and later versions are not yet supported when executing Gradle. 任何帮助都会真正得到<<>的赞赏!