- Ошибка синхронизации Gradle при попытке создания проекта Android в IntelliJ IDEA
- Saved searches
- Use saved searches to filter your results more quickly
- Gradle say Java home is different in macOS Catalina #10041
- Gradle say Java home is different in macOS Catalina #10041
- Comments
- Expected Behavior
- Current Behavior
- Context
- Steps to Reproduce
- Your Environment
- Saved searches
- Use saved searches to filter your results more quickly
- Gradle say Java home is different in macOS Catalina #10041
- Gradle say Java home is different in macOS Catalina #10041
- Comments
- Expected Behavior
- Current Behavior
- Context
- Steps to Reproduce
- Your Environment
Ошибка синхронизации Gradle при попытке создания проекта Android в IntelliJ IDEA
23:29 Gradle sync failed: The newly created daemon process has a different context than expected.
It won’t be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Wanted: DefaultDaemonContext[uid=null,javaHome=D:\IT\IT-Programs\IntelliJ IDEA Community Edition 2016.3\jre,daemonRegistryDir=C:\Users\Pazuk\.gradle\daemon,pid=2624,idleTimeout= null,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1251,-Duser.country=RU,-Duser.language=ru,-Duser.variant]
Actual: DefaultDaemonContext[uid=b0ab2a58-7680-4efa-8ae6-4ed99a898516,javaHome=C:\Program Files\Java\jdk1.8.0_112,daemonRegistryDir=C:\Users\Pazuk\.gradle\daemon,pid=3288 ,idleTimeout=60000,daemonOpts=-Xmx1536m,-Dfile.encoding=windows-1251,-Duser.country=RU,-Duser.language=ru,-Duser.variant]
Consult IDE log for more details (Help | Show Log)
Ключевые слова тут, как я понимаю, «Java home is different».
Моя конфигурация:
Windows 7
IntelliJ IDEA 2016.3
Java 8.0.112
Причем, например, проект в Android Studio у меня создается без данной ошибки.
До этого также было Gradle sync failed (и в IntelliJ IDEA и в Android Studio). Но по другой причине:
Гуглил на эту тему. На сколько поняв по нагугленому, у меня «джава» ругается на то, что она пытается взять оперативной памяти больше, чем у меня есть свободной (у меня в системе 4Гб). И нужно уменьшить ее аппетиты. По нагугленному проделал следующее:
по следующему пути: Панель управления>Java>Java>View>Runtime Parametrs прописал «-Xmx768M»
Чем, на сколько я понял, сделал лимит для джавы в 768Мб.
После данной операции ошибка ( которая
исчезла). И в Android Studio все стало нормально. А вот в IntelliJ IDEA по прежнему проект не создается. Собственно, по причине сабжа.
Такие ошибки я нагуглил. Как и варианты их решения.
Напремер:
1. Try setting the following in your gradle.properties (either in %USERPROFILE%\.gradle\ or in your project build dir): org.gradle.java.home=C:\Program Files\Java\jdk1.6.0_45\jre
2. I managed to solve this problem by renaming Info.plist and version.plist to Info.plist.old and version.plist.old in /Applications/IntelliJ IDEA.app/Contents/jre/jdk/Contents folder on Mac.
After this fix, I also created idea.properties file in ~/Library/Preferences/IntelliJIdea2016.2 and added line gradle.java.home=$(/usr/libexec/java_home)
3. Would you mind trying removing the ‘org.gradle.java.home’ line from the ‘gradle.properties’ file and setting the ‘JAVA_HOME’ env var with the value?
4. For whatever reason I had symlink
/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/tools.jar pointing to /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/lib/tools.jar
It seems this confuses Gradle. After removing this symlink Gradle works without problems.
5.Мне помогло следующее:
1. В папке %USERPROFILE%\.gradle\ следует создать файл «gradle.properties»
2. В этом файле добавить одну строку:
org.gradle.java.home=
в вашем случае:
org.gradle.java.home=C:/Program Files/Java/jdk1.8.0_112
Но я не могу разобраться, что они меняют и в каких файлах прописывают указанные вещи. Новичек.
Вобщем, как-то так.
Если что, то путь JAVA_HOME в Панель управления>Все элементы панели управления>Система Дополнительные параметры системы>Дополнительно>Переменные среды>Системные переменные у меня прописан к моему фактическому положению папки с JDK. В моем случае это: C:\Program files\Java\jdk1.8.0_112
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle say Java home is different in macOS Catalina #10041
Gradle say Java home is different in macOS Catalina #10041
Comments
Gradle say Java home is different in macOS Catalina. enter image description here
But /System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home is /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details FAILURE: Build failed with an exception. * What went wrong: The newly created daemon process has a different context than expected. It won't be possible to reconnect to this daemon. Context mismatch: Java home is different. Wanted: DefaultDaemonContext[uid=null,javaHome=/System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home,daemonRegistryDir=/Users/Tbxark/.gradle/daemon,pid=5721,idleTimeout=null,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=en,-Duser.variant] Actual: DefaultDaemonContext[uid=82e938c7-6025-4d53-8483-ce12ef8da436,javaHome=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home,daemonRegistryDir=/Users/Tbxark/.gradle/daemon,pid=5730,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=en,-Duser.variant] * 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
Expected Behavior
Current Behavior
The newly created daemon process has a different context than expected.
It won’t be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Context
------------------------------------------------------------ Gradle 5.5.1 ------------------------------------------------------------ Build time: 2019-07-10 20:38:12 UTC Revision: 3245f748c7061472da4dc184991919810f7935a5 Kotlin: 1.3.31 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019 JVM: 12.0.2 (Oracle Corporation 12.0.2+10) OS: Mac OS X 10.15 x86_64
Steps to Reproduce
In fact, any gradle project can run on macos10.14, which has the same problem on macos10.15.
Your Environment
$ echo $JAVA_HOME /System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
The text was updated successfully, but these errors were encountered:
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle say Java home is different in macOS Catalina #10041
Gradle say Java home is different in macOS Catalina #10041
Comments
Gradle say Java home is different in macOS Catalina. enter image description here
But /System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home is /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details FAILURE: Build failed with an exception. * What went wrong: The newly created daemon process has a different context than expected. It won't be possible to reconnect to this daemon. Context mismatch: Java home is different. Wanted: DefaultDaemonContext[uid=null,javaHome=/System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home,daemonRegistryDir=/Users/Tbxark/.gradle/daemon,pid=5721,idleTimeout=null,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=en,-Duser.variant] Actual: DefaultDaemonContext[uid=82e938c7-6025-4d53-8483-ce12ef8da436,javaHome=/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home,daemonRegistryDir=/Users/Tbxark/.gradle/daemon,pid=5730,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=en,-Duser.variant] * 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
Expected Behavior
Current Behavior
The newly created daemon process has a different context than expected.
It won’t be possible to reconnect to this daemon. Context mismatch:
Java home is different.
Context
------------------------------------------------------------ Gradle 5.5.1 ------------------------------------------------------------ Build time: 2019-07-10 20:38:12 UTC Revision: 3245f748c7061472da4dc184991919810f7935a5 Kotlin: 1.3.31 Groovy: 2.5.4 Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019 JVM: 12.0.2 (Oracle Corporation 12.0.2+10) OS: Mac OS X 10.15 x86_64
Steps to Reproduce
In fact, any gradle project can run on macos10.14, which has the same problem on macos10.15.
Your Environment
$ echo $JAVA_HOME /System/Volumes/Data/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home
The text was updated successfully, but these errors were encountered: