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. SQL Server索引碎片整理实际操作记录

    SQL Server 版本是 2008 R2. 查询数据库索引碎片情况的 SQL 语句(来源): SELECT OBJECT_NAME(ind.OBJECT_ID) AS TableName, ind ...

  2. [Swift]LeetCode557. 反转字符串中的单词 III | Reverse Words in a String III

    Given a string, you need to reverse the order of characters in each word within a sentence while sti ...

  3. [Swift]LeetCode1015. 可被 K 整除的最小整数 | Smallest Integer Divisible by K

    Given a positive integer K, you need find the smallest positive integer N such that N is divisible b ...

  4. BBS论坛(五)

    5.1.cms后台修改密码功能完成 (1)新建app/forms.py # app/forms.py from wtforms import Form class BaseForm(Form): de ...

  5. Qt5模块简介

        原文链接:Qt5 模块简介 无意中看到这篇文章,虽然讲的不是经常用的东西,但是看了这篇文章之后,可以对qt有个大致的了解,能够清晰的知道自己想要什么,应该关注那一部分,学习了,相信以后会又很大 ...

  6. 使用ML.NET实现猜动画片台词

    前面几篇主要内容出自微软官方,经我特意修改的案例的文章: 使用ML.NET实现情感分析[新手篇] 使用ML.NET预测纽约出租车费 .NET Core玩转机器学习 使用ML.NET实现情感分析[新手篇 ...

  7. asp.net mvc简单实现基于Razor的分页控件

    最近在写一些web应用了解了一下asp.net mvc发现的确好用,所以直接就干上了.不过在使用asp.net mvc的Razor模板的情况并不向传统webform那样可以使用控件.但从Razor的功 ...

  8. ASP.NET页面之间的几种传值方法

    首先是QueryString方法传值: QueryString是一种非常简单的传值方式,他可以将传送的值显示在浏览器的地址栏中.如果是传递一个或多个安全性要求不高或是结构简单的数值时,可以使用这个方法 ...

  9. 一文看懂https如何保证数据传输的安全性的

    通过漫画的形式由浅入深带你读懂htts是如何保证一台主机把数据安全发给另一台主机的 对称加密 一禅:在每次发送真实数据之前,服务器先生成一把密钥,然后先把密钥传输给客户端.之后服务器给客户端发送真实数 ...

  10. 行为驱动:Cucumber + Selenium + Java(二) - 第一个测试

    在上一篇中,我们搭建好了Selenium + Cucumber + Java的自动化测试环境,这一篇我们就赶紧开始编写我们的第一个BDD测试用例. 2.1 创建features 我们在新建的java项 ...