Android Studio Error -- Could not create the Java Virtual Machine
:app:dexDebug
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit. FAILED FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Program Files\adt-bundle-windows-x86-20140702\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output E:\android\workspace\DialogDemo\app\build\intermediates\dex\debug --input-list=E:\android\workspace\DialogDemo\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
1
Output:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit. * Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
Gradle打包的时候经常出现此错误,命令--stacktrace
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
目前google and 百度查询有两种解决方案
1.设置java的
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
修改这三个参数
2.升级JDK
经过测试2种方案都不行
通过
dx.bat --dex
命令的dx.bat脚本有这样一句代码
REM By default, give dx a max heap size of 1 gig and a stack size of 1meg.
rem This can be overridden by using "-JXmx..." and "-JXss..." options below.
set defaultXmx=-Xmx1024M
set defaultXss=-Xss1m
set defaultXmx=-Xmx1024M
原因就是此处设置的Xmx为1024M,编译打包APK时java虚拟机内存空间不足,修改为512M即可正常编译打包了。
set defaultXmx=-Xmx512M
Android Studio Error -- Could not create the Java Virtual Machine的更多相关文章
- weblogic10.3 启动报错 Unrecognized option: -jrockit Error: Could not create the Java Virtual Machine
今天在使用weblogic10.3+jdk7创建domain的时候,建好domain后启动报如下错误信息: Unrecognized option: -jrockitError: Could not ...
- Eclipse 出错 Error:Could not create the Java Virtual Machine Error:A fatal exception has occurred
提示如下: scala compile server. error:could not create the java machine.Error: A fatal exception has occ ...
- kettle启动“Error: could not create the Java Virtual Machine”
因为我的操作系统是32bit,而Ketttle的Spoon脚本中,默认是PENTAHO_DI_JAVA_OPTIONS="-Xms1024m" "-Xmx2048m&qu ...
- myeclipse 10配置jboss 7.1.1无法启动Error: Could not create the Java Virtual Machine
myeclipse 10中配置jboss 7.1.1,多写了个server name,结果死活启动不了.后来,发现了这个细节. 错误显示: 错误源头: 删掉Server name后,可以完美启动 小问 ...
- weblogic安装使用: Could not Create the Java Virtual Machine
第一次使用weblogic,完全不明白是怎么一回事!找安装包花了大把时间!找到了不知道怎么安装 -- _ --||| 找了一篇安装文档<weblogic 安装部署手册.doc>, 位于:[ ...
- Kafka中错误:Unrecognized VM option ‘UseCompressedOops’ Error: Clould not create the Java Vritual Machine. Error: A fatal exception has occurres . Program will exit.
错误的描述: 在kafka安装目录下,执行 $ bin/zookeeper-server-start.sh config/zookeeper.properties & Unrecognized ...
- java virtual machine launcher Error:Could not create the Java Virtual Machine. Error:A Fatal exception has occurred,Program will exit.
Error:Could not create the Java Virtual Machine. Error:A Fatal exception has occurred,Program will e ...
- Failed to create the Java Virtual Machine.问题的解决
运行Eclipse,出现了"Failed to create the Java Virtual Machine."错误: 解决的办法是在Eclipse的解压目录下找到eclipse ...
- 【 Failed to create the Java Virtual Machine】的2种解决方式
初学Android,下载并安装好了eclipse,ADT和SDK之后,打开Eclipse时,出现: Failed to create the Java Virtual Machine 点击确定,ecl ...
随机推荐
- Python - 文本处理模块
文本处理模块 本文地址: http://blog.csdn.net/caroline_wendy/article/details/27050431 Python的文本处理模块, 使用四种内置库. st ...
- 表格中的IE BUG
在表格应用了跨列单元格后,在IE6/7下当跨列单元格中的元素长度超过其跨列单元格中第一个单元格的宽度时会产生换行,如下所示: 解决方法: 1. 设置 table 的 'table-layout' 特性 ...
- Laravel 5系列教程六:表单 Forms
免费视频教程地址https://laravist.com/series/laravel-5-basic 在开始之前,我们把界面先美化一点点先: 首先到https://github.com/JellyB ...
- Netty源码分析之NioEventLoop(转)
原文:http://www.jianshu.com/p/9acf36f7e025 上一章节中,我们分析了Netty服务的启动过程,本章节分析Netty的NioEventLoop是如工作的. NioEv ...
- Django——模版Template报错
>>> from django.template import Template >>> t = Template("My name is {{ my_n ...
- 基于windows api实现的共享锁/独占锁
众所周知,windows平台上实现线程同步.或者说资源的加锁与解锁的方法有内核事件.临界区.相互排斥量.信号量,甚至interlocked系列函数等多种手段. 可是在日常的编程中,我们使用这些手段对 ...
- 语言那点事,crt
C语言标准(不管是ANSI 还是ISO)包含2部分,一部分是语言本身的标准,另一部分是C标准函数库.C标准函数库规定了函数的原型和功能,但是并没限定这些函数要怎么实现.所谓满足标准C规定的C编译器,不 ...
- Android.KungFu手机病毒原理及清理方法
原文链接:http://jingyan.baidu.com/article/363872ec8ad56b6e4ba16fb1.html Android.KungFu手机病毒清理方法 浏览:3333 | ...
- js获取本页的来源地址
document.referrer 该属性可以获取到文档的载入地址 需要注意必须是通过改变localtion的href属性或a标签跳转才能获取到 否者将获取到空字符串
- css解决方案之css布局
固定宽度布局解决方案 固定宽度的居中布局 首先我们这里探讨的是我们常用的固定宽度的居中布局,这应该是目前实战中应用的最多的了. 然后从考虑是否应用大背景上我们分为两种,一种是允许整体有一个大背景,一种 ...