Gradle工程错误:Gradle sync failed: Java home is different

Gradle sync failed: Java home is different

(1)错误描述

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:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.3\jre,daemonRegistryDir=C:\Users\SAMSUNG\.gradle\daemon,pid=14504,idleTimeout=null,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]

Actual: DefaultDaemonContext[uid=e3f7107e-b6b3-4f6b-a3ae-a4bbaa04305c,javaHome=D:\Java\jdk1.8.0_121,daemonRegistryDir=C:\SAMSUNG\lihy\.gradle\daemon,pid=18556,idleTimeout=60000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=GBK,-Duser.country=CN,-Duser.language=zh,-Duser.variant]

Consult IDE log for more details (Help | Show Log)

(2)解决方法:

在gradle.properties文件中加入org.gradle.Java.home=E\:\\Software\\Android\\Java\\jdk1.8.0_92

时间: 2024-11-20 14:14:52

Gradle工程错误:Gradle sync failed: Java home is different的相关文章

解决parseSdkContent failed java.lang.NullPointerException错误

今天我的eclipse崩溃了,报“parseSdkContent failed java.lang.NullPointerException”的错误. 所有的安卓项目都不正常,创建项目就会报 java.lang.NullPointerException的错误.后来上网搜到了解决办法, 办法就是,把项目的存储路径下的.metadata(即:workspace\.metadata)文件删了就行了.但重新打开 eclipse,你的原工作路径下的工程也都不存在.那你就重新导入原工作路径下的所有工程. 解

Android Studio 首坑 Gradle sync failed: Cause: error in opening zip file 的错误

前言 本文章主要通过介绍如果Android Studio安装时出现包错误的解决方式及思路,授予人鱼不如授予人渔. 环境: 操作系统:Windows 7 SP1 安卓编译环境:Android studio 2.3.1 JDK:jdk1.8.0_102 错误: Gradle sync failed: Cause: error in opening zip file  Consult IDE log for more details (Help | Show Log) 经历: 1.尝试用是 Sync

AS中加载gradle时出现Gradle sync failed: Could not find com.android.tools.build:gradle.的错误

时间:2019/12/7 这次接着整理加载gradle时出现的错误 出现的错误: 1 Gradle sync failed: Could not find com.android.tools.build:gradle:3.5.0. 2 Searched in the following locations: 3 file:/F:/studio/studio2.0/gradle/m2repository/com/android/tools/build/gradle/2.8/gradle-2.8.p

Gradle project sync failed

在Android Studio中运行APP时出现了以下错误: gradle project sync failed. please fix your project and try again 解决的办法是点击:tools ->Android->sync project with gradles files!

Gradle sync failed: failed to find Build Tools revision 21.1.2

从github上下载了一个开源项目到Android Studio 出现以下问题: 下午2:56:05 Gradle sync started下午3:00:11 Gradle sync failed: failed to find Build Tools revision 21.1.2 Consult IDE log for more details (Help | Show Log) 解决办法: 查找SDK安装目录\build-tools 下查看自己的BuildTools 版本,然后修改项目为该

Android studio Gradle project sync failed

Android studio 构建项目出错 Error:Unable to start the daemon process: could not reserve enough space for object heap.Please assign more memory to Gradle in the project's gradle.properties file.For example, the following line, in the gradle.properties file,

gradle编译出错:Execution failed for task ':app:compileTestDebugJava'.

今天更新了android studio,从0.5.3升级到0.6.1版本,结果在IDE中编译时没有问题,但是在命令行时编译就会出现以下错误: :app:compileTestDebugJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileTestDebugJava'. > No signature of method: com.a

Gradle 同步 已经开始 Gradle sync started

Gradle 同步 已经开始 Gradle sync started 作者:韩梦飞沙 Author:han_meng_fei_sha 邮箱:[email protected] E-mail: 313134555 @qq.com 安卓Gradle插件更新 介绍 介绍 recommended 为了利用所有最新的特性(例如即时运行), 改进和安全补丁, 我们强烈建议你将Android升级版的插件升级到2.3.3版本,升级到3.3版. To take advantage of all the lates

Android(java)学习笔记127:Android Studio新建工程中的build.gradle、settings.gradle

随着信息化的快速发展,IT项目变得越来越复杂,通常都是由多个子系统共同协作完成.对于这种多系统.多项目的情况,很多构建工具都已经提供了不错的支持,像maven.ant.Gradle除了借鉴了ant或者maven的继承的方式定义子项目,也提供了一种更为方便的集中配置的方式,大大减少了构建带来的复杂度.除此之外,Gradle还提供了清晰的Project树模型来映射多项目的组织结构.下面,让我们了解一下如何使用Gradle构建多项目. 1.多项目的定义和结构 Mulit project 设置是grad