English 中文(简体)
供应的javaHome似乎是无效的。 我不能认为可以起诉。 Tried place: C:Program filesJavajdk-17injava.exe
原标题:The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:Program FilesJavajdk-17injava.exe

我现在把我的头发拖了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.

任何帮助都会真正得到<<>的赞赏!

最佳回答

确保您的JAVA_HOME 您的终点站

echo %JAVA_HOME%

其一共犯错误,而在PATH, j之家就只能是你们的 j,如C:Program 文件,Javajdk-15。

删除了jdk-17的双管,然后搁置了31和30版本的猪肉建筑工具,这应当解决这个问题。

问题回答

after update to Android Studio 22.1.1, just delete folder jre in C:Program FilesAndroidAndroid Studio it works for me

Deleting Java17 SDK and C:Program filesJava rafter work for me. 使用<条码> 而不是Java17 SDK

复印件:

加入:

C:Program filesAndroidAndroid

和你一样。

Go to C:Program FilesAndroidAndroid Studio You will find the "jbr" directory and the "jre" directory copy the content of the "jbr" directory into the "jre" directory.

Run your project again. It should work now.?

注:

  • you may have to delete the bin inside the "jre" first if refuse to paste.
  • you may have to check the environment variable.

我面临这个问题,因为我有多个ks子,例如,在我的ava里,有1.8头和 j11。 除我工作11人外,删除其他 j。

供应的javaHome似乎是无效的。 我不能认为可以起诉。 Tried place: C:Program filesJavajdk1.8.0_341injava

I was in a similar problem and you can solve it in the following way --> Go to Disk C, Find the java folder in android and delete the previous version of jdk by default it comes with 1.8 C:Program FilesJava for Reac native version 11 of jdk is recommended.

Copying all the contents from the bin folder of my Java installation directory C:Program FilesJavajdk-19in to the Android Studio jre folder C:Program FilesAndroidAndroid Studiojrein helped fix the problem when using Android Studio Flamingo | 2022.2.1 Patch 1 Build #AI-222.4459.24.2221.9971841, built on April 19, 2023 and Java 19 SDK

我之所以这样做,是因为无法在审判地点找到可起诉的java:C:Program filesJavajdk-17injava.exe,是因为它在那里确实存在,因此,我们可以像我上文所述那样,通过本件内容的复印件和剪辑,轻松地把它放在这里。

我得到了其他答复和我试图找到这一解决办法的帮助:

  1. Delete jdk folder in Android Studio directory
  2. Change path in Windows Env. Variables JAVA_HOME: .../Android Studio/jdk => .../Android Studio/jbr
  3. Restart your IDE

仅仅打开方案文件夹和脚印,然后打开 and子,然后把所有档案从碎块碎块fold到碎块,以取代所有档案,因为你从碎块fold碎 files的碎 files子中翻一番,认为这肯定会为所有人服务。

reminder to Add this location: JAVA_HOME C:Program FilesJavajdk-21 and C:Program FilesJavajdk-21in in Path in environment variable and delete old folder around jdk11 for mee





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...