invalid gradle jdk configuration found open gradle settings change jdk location что значит

Invalid gradle jdk configuration found open gradle settings change jdk location что значит

When I open a project and report this error,

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Looking at the error message, you can roughly know that it is the JDK configuration problem, and then I will check the JDK configuration:

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Or just follow the method recommended by netizens:

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Modify the parameters here, and then rebuild.

Intelligent Recommendation

Under Ubuntu JDK, SDK, Gradle configuration

JDK, Tomcat, Maven, Gradle environment variable configuration

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Android Studio and Gradle use different JDK location of the problem (Android Studioand Gradle are using different locations forthe JDK)

Initial installation of Android Studio, encountered many problems, which is one share, also to seek dalao you look at it ((* ^ __ ^ *)) Use a different JDK position may cause Gradle produce multiple d.

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Gradle tutorial (2): Gradle project structure and property configuration

2.1 Declarations (Conventions) Some people translate the word «Conventions» into «conventional», some people translate it into «declarative», I prefer the latter, so I wi.

Источник

Неверная конфигурация JDK найдена, при импорте проекта через Gradle

Я установил IntelliJ, и мне нужно импортировать проект Gradle.

Я построил проект gradle с помощью командной строки с помощью команды build.

На приветственной странице IntelliJ я приступил к выполнению правильных инструкций, и когда я выбираю «Готово». Я получаю следующую ошибку:

Неверная конфигурация JDK Gradle. Параметры Open Gradle JANA_HOME не заданы.

Когда я нажимаю «Open Gradle Settings», он появляется с ошибкой «Не найден с дорожкой в каталоге IntelliJ в файлах программы и ищет в jre/jre/bin/. и т.д.».

ОТВЕТЫ

Ответ 1

Просто нашел решение:

Ответ 2

Вам не нужно создавать новый проект, чтобы это исправить. Вы можете сделать это из главного окна (Конфигурировать → Стандартные настройки проекта → Структура проекта):

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Затем в SDK просто установите соответствующий JDK home path :

invalid gradle jdk configuration found open gradle settings change jdk location что значит

Ответ 3

Решение для Mac OS X:

У меня была такая же проблема и исправлена ее, установив переменную среды JAVA_HOME с помощью команды:

См. Этот ответ о том, как установить переменные среды в Mac OS X: настройка переменных среды в OS X?

Ответ 4

Ответ 5

Ответ 6

У меня была такая же проблема на новой установленной ОС Windows. У меня вообще не было JDK, и я забыл проверить неправильную конфигурацию JDK. По умолчанию вы можете проверить конфигурацию проекта. Если оно пустое, NO_SDK_ProjectStructure попробуйте загрузить JDK с веб-сайта Oracle и настроить структуру своего проекта.

Источник

How to instruct Gradle to use Java from different location?

I was building my test app in Android Studio, then in the Event Log it said:

Android Studio is using this JDK location: C:\Program Files\Android\Android Studio\jre which is different to what Gradle uses by default: C:\Program Files (x86)\Java\jdk1.8.0_181 Using different locations may spawn multiple Gradle daemons if Gradle tasks are run from command line while using Android Studio.

Then gave these options:

Set Android Studio to use the same JDK as Gradle and sync

then my app didn’t want to build any more.

Gradle sync failed: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.

For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html

Please read the following process output to find out more:

Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap Consult IDE log for more details (Help | Show Log) (16 s 166 ms)

I checked the event logs:

I think previously it did this:

Instructing gradle to use java from C:/Program Files/Android/Android Studio/jre

Instructing gradle to use java from C:/Program Files (x86)/Java/jdk1.8.0_181

How do I set it back to the way it was so my app can build again?

Источник

After Android Studio sync my gradle project, I see the following message in the event log:

Android Studio is using this JDK location: /path/to/my/project/specific/jdk which is different to what Gradle uses by default: /path/to/android/studio/embedded/jdk Using different locations may spawn multiple Gradle daemons if Gradle tasks are run from command line while using Android Studio. Set Android Studio to use the same JDK as Gradle and sync project

6 Answers 6

Update

This answer deals with macOS cases. It doesn’t imply Linux or Windows solutions.

TLDR

or, if you want to use your system-defined JDK:

But this only works for the current session of your machine. Next, you have to create a

or, if you want to use your system-defined JDK:

The plist will activate after system reboot. You can also use launchctl load

/Library/LaunchAgents/environment.plist to launch it immediately.

Deeper explanation

I suspected that Android Studio didn’t actually see my JAVA_HOME environment variable, so I inspected the Android Studio process’ environment variables:

Next, I tried launching Android Studio from the terminal:

I started getting this warning after updating to Android studio version 3.6. I was getting below warning:

To fix this warning I changed the project JDK location to Gradle JDK location.

from dropdown select JDK location of your Gradle. In my case it is below location :

Click apply and Ok.

invalid gradle jdk configuration found open gradle settings change jdk location что значитI am using a windows system from microsoft too. To solve the this problem, just follow these simple steps.

Set your JAVA_HOME environnement variable to point to your installed jdk. In my case that was C:\Program Files\Java\jdk-9.0.1

Then, In Android studio, click on Select a JDK from the File System from your Even Log or go to project struture then sdk location.

Set the jdk location as indicate in the above image and click on apply.

invalid gradle jdk configuration found open gradle settings change jdk location что значит

I’m running Windows and had the same error when upgrading to AS 3.6.1.

As well as Android projects I also build Java projects on the same machine, both of which use different versions of Java. So pointing AS / Gradle wrapper to my JAVA_HOME is not an option.

To solve the problem I need my environment variable JAVA_HOME to point to my Java projects and JAVA_HOME for AS / Gradle to point to the version of the JRE shipped with AS.

There is a simple solution. Its a bit messy, but it works. To do this you will need to be able to see hidden files. Then mod the Gradle wrapper batch file as follows:

Go to the function:

This isn’t a permanent solution, as it may well be overwritten with new versions of Gradle, however it works for now and hopefully long enough for someone (hopefully Google) to point AS and is Gradle wrappers to the correct location by default.

Источник

gradle-wrapper.properties not found after clean install intellij idea 2020.1.2 community edition on windows 10

Installed clean windows10(1607) and intellij idea(2020.1.2 community edition). When i create new gradle project

invalid gradle jdk configuration found open gradle settings change jdk location что значит

4 Answers 4

sdk install gradle 6.7 brew install gradle

Go to IntelliJ and set gradle version:

In Use Gradke from specific the correct location

invalid gradle jdk configuration found open gradle settings change jdk location что значит

invalid gradle jdk configuration found open gradle settings change jdk location что значит

If IDEA is set to use the Gradle wrapper (as it is in your screenshot: «Use Gradle from:» is set to «gradle-wrapper.properties»), IDEA expects the following file structure:

If you are missing one of these three elements, IDEA will attempt to generate the wrapper by calling the gradle wrapper task. It will do this using the Gradle JDK, which may or may not be the project SDK ( File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM ).

invalid gradle jdk configuration found open gradle settings change jdk location что значит

I tried various options for clearing the cache, but did not get the result. Openjdk-14 installed by default and does not work. From site adoptopenjdk.net install OpenJDK 11 (LTS). When creating the project, I chose 11 version. Then the program suggested updating gradle to version 6 and it worked.

invalid gradle jdk configuration found open gradle settings change jdk location что значит

I ran into this problem a while ago when I upgraded to intellij 2020.* The first time I created a new project there was no problem: gradle daemon did its work and the project was created with no problems.

In my case, the project would start a new gradle daemon, and attempt to build the project, would get rejected by windows Security, and nothing would happen, so intellij goes ahead and starts another (unsuccessful) daemon. Soon, I had 20+ gradle daemon processes running on my system, all of them doing nothing.

So, it looks like intellij has messed in enabling that it places the appropriate permissions it requires for these folders that it depends on to run properly. So, you need to manually give these permissions, and then things (should) work.

The real issue here is security on your machine: either a virus checker or the security software, Windows Security on Windows 10, for example. The first time you make a project, Intellij goes and produces a number of folders that they need access to.

However, once these folders are available, for whatever, intellij doesn’t make sure to give itself access.

On windows 10, in AppData, you’ll find several folders required by Intellij to produce, in my case, produce gradle projects.

Try finding the various folders that Intellij has produced on your system, and give them exceptions on your virus checker and on whatever firewall/security software programs that may block access.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *