本文介绍了gradle 项目同步失败.基本功能(例如编辑、调试)在 android studio 1.0.1 中将无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始使用 Android Studio 1.0.1,但我无能为力,因为出现此错误,甚至无法呈现 XML.

I have started using Android Studio 1.0.1 and there is nothing I can do as I have this error and even the XML can't be rendered.

错误:无法启动守护进程.此问题可能是由守护程序的错误配置引起的.例如,使用了无法识别的 jvm 选项.请参阅 http://gradle.org/上的用户指南章节docs/2.2.1/userguide/gradle_daemon.html

Error: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 guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html

VM 初始化过程中发生错误无法为对象堆保留足够的空间错误:无法创建 Java 虚拟机.错误:发生了致命异常.程序将退出.

Error occurred during initialization of VMCould not reserve enough space for object heapError: Could not create the Java Virtual Machine.Error: A fatal exception has occurred. Program will exit.

还有其他人面临同样的问题吗?

Somebody else facing the same problem?

推荐答案

我遇到了同样的问题.在我的情况下,修复是引用正确版本的 JDK.我的 Android Studio 是 64 位的(在 Windows 上,您可以在任务管理器中看到它作为 studio64.exe),而它指的是 32 位 JDK.要检查它,请转到 File > Other Settings > Default Project Structure > JDK location 并检查路径.在 windows 下,如果它显示 32 位位置 C:\Program Files (x86)\Java\jdk1.7.0_25 而不是 64 位路径 C:\Program Files\Java\jdk1.7.0_XX 然后将其更改为正确的.如果您没有 64 位 JDK,请下载并安装它.

I got the same issue. The fix in my case was to refer to a correct version of JDK. My Android Studio is 64-bit (on Windows you can see it in task manager as studio64.exe) while it was referring to 32-bit JDK. To check it go to File > Other Settings > Default Project Structure > JDK location and check the path. Under windows, if it shows 32-bit location C:\Program Files (x86)\Java\jdk1.7.0_25 instead of 64-bit path C:\Program Files\Java\jdk1.7.0_XX then change it to the correct one. If you don't have a 64-bit JDK then download and install it.

这篇关于gradle 项目同步失败.基本功能(例如编辑、调试)在 android studio 1.0.1 中将无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 16:23