摇篮Android Studio中给错误项目同步失败 [英] Gradle in Android Studio giving error Project sync failed
问题描述
我是新来的Android Studio.I安装Android的工作室 - 1.2.1.1和我有jdk1.7.0_40 installed.I现在所面临的问题与构建的gradle。
仅供参考,您可以检查问题的gradle
I am new to Android Studio.I installed Android Studio-1.2.1.1 and i have jdk1.7.0_40 installed.I am facing problem with gradle build. For reference you can check gradle issue
我收到以下错误消息中
Error:The newly created daemon process has a different context than expected.
Java home is different.
Expecting: 'C:\Program Files\Java\jdk1.7.0_40' but was: 'C:\Program Files\Java\jdk1.7.0_40\jre'.
Please configure the JDK to match the expected one.
<a href="open.project.structure">Open JDK Settings</a>
所有我知道的gradle是用JRE和Android工作室使用JDK,并且由于两个JAVA_HOME的不同,给予的错误。
All i understood is gradle is using JRE and Android Studio is using JDK and due to that two JAVA_HOME's are different and giving errors.
我尝试下载此文件在android系统的gradle工作室和2.3的gradle改变路径,还是同样的问题。
I tried downloading gradle 2.3 and changed gradle path in android studio to this file,still same problem.
任何专家...
推荐答案
编辑:
我通过卸载所有的jdk安装及固定放这个问题;更新
然后重新安装只有一个JDK和保证其ENV。变量
I fixed this issue by uninstalling all the jdk installation & updates then reinstall only one jdk and assure its env. variables
我没有一个解决方案,但我有同样的问题
它发生由于Android工作室从JAVA_HOME / JRE那里所有JVM接下来将来自这条道路,这将打开叉,而你的系统varible告诉摇篮让他从JAVA_HOME的java.exe
I do not have a solution but I have the same problem it happens as the android studio opens from java_home/jre thence all JVMs that will fork next will come from this path, while your system varible tells Gradle to get his java.exe from JAVA_HOME
我试图从JRE的gradle使读,但它也falied我试图让机器人工作室从JAVA_HOME / bin中打开,但它也falid
I tried to make gradle read from jre but it falied also i tried to make android studio open from java_home/bin but it falid also
这篇关于摇篮Android Studio中给错误项目同步失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!