简体   繁体   English

在Windows 7 64bit上运行的Android Studio失败

[英]Android Studio run on Windows 7 64bit fails

I had successfully installed Android Studio on Windows 7 64bit , but when I started it , it's not work and show nothing . 我已经在Windows 7 64bit上成功安装了Android Studio,但是当我启动它时,它不起作用并且什么都不显示。 Then I appended the pause command to the end of the studio.bat . 然后我将pause命令附加到studio.bat的末尾

When I execute via CMD, I get the following error: 当我通过CMD执行时,我收到以下错误:

Unrecognized VM option '+UseCodeCacheFlushing' 无法识别的VM选项'+ UseCodeCacheFlushing'

Could not create the Java virtual machine. 无法创建Java虚拟机。

My Jdk version is JDK 1.6 我的Jdk版本是JDK 1.6

I would like to ask how to solve it? 我想问一下如何解决它?

Go to your install directory 转到安装目录

C:\Program Files (x86)\Android\android-studio\bin

and copy the files 并复制文件

studio64.exe.vmoptions
studio.exe.vmoptions

to your documents. 到你的文件。 Edit them and remove the line 编辑它们并删除该行

-XX:+UseCodeCacheFlushing

in each. 每个。 Then copy them back to 然后将它们复制回去

C:\Program Files (x86)\Android\android-studio\bin

and try to relaunch again. 并尝试重新启动。

Hey I have found the solution! 嘿,我找到了解决方案!

Just update to JDK 1.7! 只需更新到JDK 1.7!

And Set latest installed JDK path in both JAVA_HOME and JDK_HOME environment variables. 并在JAVA_HOME和JDK_HOME环境变量中设置最新安装的JDK路径。

In my case it is as follows: 在我的情况下,它如下:

  • JDK_HOME->C:\\Program Files\\Java\\jdk1.7.0_21 JDK_HOME-> C:\\ Program Files \\ Java \\ jdk1.7.0_21
  • JAVA_HOME->C:\\Program Files\\Java\\jdk1.7.0_21 JAVA_HOME-> C:\\ Program Files \\ Java \\ jdk1.7.0_21

Hope it does not work with JDK 1.6 :( 希望它不适用于JDK 1.6 :(

it can be a 64 bit Problem, i had the same problem cause i installed x64 JDK 1.7 didn't work then i installed 32 bit version it worked and installation proceeded. 它可能是64位问题,我有同样的问题因为我安装x64 JDK 1.7没有工作然后我安装了32位版本它工作,安装继续进行。 It searches in the system32 folder so 32 bit JDK version is required 它在system32文件夹中搜索,因此需要32位JDK版本

Many android developer reported this problem you can solve it by 许多android开发人员报告了这个问题,你可以解决它

  1. Right click on My Computer, and select Properties. 右键单击“我的电脑”,然后选择“属性”。
  2. Click on “Advanced system settings” and go to the “Advanced” tab. 单击“高级系统设置”,然后转到“高级”选项卡。
  3. On the bottom, click the “Environment Variables” button. 在底部,单击“环境变量”按钮。 This will bring up the Environment Variables screen, you will see two sections, User Variables (at the top), and System Variables (at the bottom). 这将打开Environment Variables屏幕,您将看到两个部分,User Variables(在顶部)和System Variables(在底部)。
  4. Add a system variable with the name JDK_HOME, and the value equal to the path to your JDK install. 添加名为JDK_HOME的系统变量,其值等于JDK安装的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM