ionic build Android后的报错问题

  ionic 升级了splashscreen和statusbar的插件后,执行ionic build android会一直报打包错误。原因是过低的Android-platform版本不支持新的 splashscreen和statusbar插件

  解决 办法是:  ionic platform add android@6.1.2      添加Android平台前加上版本号就行

  然而,又有了新的问题:Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

  

  1、这时候报虚拟内存不足-----------因为我的电脑是32位的Win7 ,经测试,64位的没有这个错误。一般报这个内存不足,java的做法就是去eclipse的option修改jre的参数值就行了。

  2、但ionic的做法有点不一样:在 ionic platform add android@6.1.2  后,在 platforms\android\cordova\lib\builders 的文件夹下会有一个文件 GradleBuilder.js 

  3、用记事本打开这个文件,在内容中找到 args.push('-Dorg.gradle.jvmargs=-Xmx2048m');把这个2048m调小,具体看你的机器,我调的为256m

  4、如果没有找到 args.push('-Dorg.gradle.jvmargs=-Xmx258m');  那么在 GradleBuilder.prototype.getArgs 的函数里面的return前加上这句代码就行。

  5、最后执行ionic build android就可以跟之前一样的打包了

Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap的更多相关文章

  1. Error occurred during initialization of VM Could not reserve enough space for object heap

    Error occurred during initialization of VM Could not reserve enough space for object heap Java虚拟机(JV ...

  2. fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!

    参考文章:https://answers.atlassian.com/questions/9397/not-enough-heap-space-to-run-fisheye fisheye下载好了之后 ...

  3. Logstash测试的时候,报Error occurred during initialization of VM,Could not reserve enough space for object heap

    今天配置Logstash的时候,启动输入logstash ‐e 'input { stdin { } } output { stdout {} }'就开始报错了,Error occurred duri ...

  4. Error occurred during initialization of VM Could not reserve enough space fo

    通过es的elasticsearch.bat 启动.发现错误:Error occurred during initialization of VM Could not reserve enough s ...

  5. android Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.

    在当前工程目录中 gradle.properties 添加org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m http://stackoverflow ...

  6. 问题3-Error occurred during initialization of VM Could not reserve enough space for object heap

    初步断定是内存方面的问题 于是决定修改配置文件 D:\study\eclipse\eclipse\eclipse.ini -startupplugins/org.eclipse.equinox.lau ...

  7. jboss服务启动失败报:Error occurred during initialization of VM

    今天下午突然间公司的GTV管理平台上不去了 访问确实,提示找不到页面 登录终端查看服务进程. ps -ef | grep jboss 发现没有这个进程.怎么办,启动被. 输入nohup /home/c ...

  8. 异常 - 虚拟机初始化错误 - Error occurred during initialization of VM

    目录 1 环境配置信息 1.1 服务器配置信息 1.2 Tomcat启动参数 2 问题描述 3 问题解决 4 关于vm.overcommit_memory参数 4.1 vm.overcommit_me ...

  9. Android studio Error occurred during initialization of VM

    Unable to start the daemon process. This problem might be caused by incorrect configuration of the d ...

随机推荐

  1. [Swift]LeetCode365. 水壶问题 | Water and Jug Problem

    You are given two jugs with capacities x and y litres. There is an infinite amount of water supply a ...

  2. VirtualBox虚拟机克隆迁移步骤

    VirtualBox是常用的虚拟机管理软件,和VMware一样,用的很多.在使用过程中,有的时候需要对虚拟机进行迁移.比如我们原来的服务器,使用的win10操作系统,上面利用VirtualBox安装了 ...

  3. BBS论坛(二十九)

    29.帖子详情页布局 (1)front/hooks.py @bp.errorhandler def page_not_found(): return render_template('front/fr ...

  4. 利用NPOI生成word文档(c#)

    WordTest.aspx.cs using System; using System.IO; using System.Text; using System.Web; using System.We ...

  5. IntelliJ IDEA部署tomcat时Edit Configuration Deployment无artifact选项

    IntelliJ IDEA,IntelliJ Idea创建web项目之后在配置web项目时,选择Edit Configration部署Tomcat,Deployment里点击添加无artifact选项 ...

  6. SpringBoot完美配置阿里云的文件上传

    新建一个config类 AliyunOSS.java @Configuration @Data public class AliyunOSS { private OSSClient ossClient ...

  7. leetcode — palindrome-partitioning-ii

    import java.util.Arrays; /** * * Source : https://oj.leetcode.com/problems/palindrome-partitioning-i ...

  8. leetcode — balanced-binary-tree

    /** * Source : https://oj.leetcode.com/problems/balanced-binary-tree/ * * * Given a binary tree, det ...

  9. JDBC设计理念浅析 JDBC简介(一)

    概念 JDBC是J2EE的标准规范之一,J2EE就是为了规范JAVA解决企业级应用开发制定的一系列规范,JDBC也不例外. JDBC是用于Java编程语言和数据库之间的数据库无关连接的标准Java A ...

  10. JVM(五)垃圾回收器的前世今生

    全文共 2195 个字,读完大约需要 8 分钟. 如果垃圾回收的算法属于内存回收的方法论的话,那本文讨论的垃圾回收器就属于内存回收的具体实现. 因为不同的厂商(IBM.Oracle),实现的垃圾回收器 ...