32位xp下Android studio安装好启动没反应解决方法

昨晚Google I/O大会上发布android应用的最新IDE开发平台android studio,今天一大早就下载来安装,安装发现运行不起来!

目前有三种解决方案,都是针对执行studio.bat出现错误导致android studio运行不起来,最后都是异工同曲

1.改虚拟机配置文件studio.exe.vmoptions

有人说是java环境变量,如果不会照着设置

http://blog.csdn.net/huanghm88/article/details/3965218

因为Eclipse一直在使用,所以环境变量应该是OK的!

然后我进android studio的安装目录(安装时选择的那个目录,我的是默认的C:\Documents and Settings\用户名\Local Settings\Application Data\Android\android-studio\bin)发现bin目录有很多bat批处理,运行studio.bat提示

Unrecognized VM option '+UseCodeCacheFlushing' Could not create the Java virtual machine

果断在上述安装目录的bin目录中找到studio.exe.vmoptions文件去掉里面包含UseCodeCacheFlushing的那行

重新运行Android Studio终于出现令人激动的画面


发现网上还有其它解决方案:

2.修改批处理studio.bat

解答下32位 win7系统的问题。
进入控制台,cd到 android-studio\bin 目录下,执行studio.bat
查看报错信息。
1. 网上有一种情况是没有找到javahome,说明可能是jdk环境变量的问题,这时可以进去计算机高级系统设置里面查看下
2.我个人遇到的情况是,Unrecognized VM option '+UseCodeCacheFlushing' Could not create the Java virtual machine
创建不了虚拟机,我的java环境变量已经设置。

用文本工具打开
studio.bat
line25 to line 28:
SET JRE=%JDK%
IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
SET BITS=
IF EXIST "%JRE%\lib\amd64" SET BITS=64

可以看到里面设置软件支持系统位数是64位,而我自己所用电脑是32位的 jre/lib目录下只有i386文件
尝试把
IF EXIST "%JRE%\lib\amd64" SET BITS=64 改为
IF EXIST "%JRE%\lib\i386" SET BITS=32

3.同样是修改批处理studio.bat,修改的地方变了

对于32位的xp系统

SET BITS=

改为SET BITS=32

64位系统不变



PS:对于网友提问UseCodeCacheFlushing是什么意思,查到如下说明

http://blog.codecentric.de/en/2012/07/useful-jvm-flags-part-4-heap-tuning/

-XX:+UseCodeCacheFlushing
If the code cache grows constantly, e.g., because of a memory leak caused by hot deployments, increasing the code cache size will only delay its inevitable overflow. To avoid overflow, we can try an interesting and relatively new option: to let the JVM dispose some of the compiled code when the code cache fills up. This may be done by specifying the flag -XX:+UseCodeCacheFlushing. Using this flag, we can at least avoid the switch to interpreted-only mode when we face code cache problems. However, I would still recommend to tackle the root cause as soon as possible once a code cache problem has manifested itself, i.e., identify the memory leak and fix it.
大概意思这个选项是用来避免代码缓存溢出问题,如果你觉得不妥可以其它两个解决方案,我暂时没发现问题

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值