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. 如何将多个数据的- 转为:来匹配josn格式

    var str = `北京 2 河北 3 河北-邯郸 301 河北-保定 302 河北-邢台 303 山东 4 山东-青岛 401 山东-烟台 402`; var arrStr = str.split ...

  2. [Swift]LeetCode167. 两数之和 II - 输入有序数组 | Two Sum II - Input array is sorted

    Given an array of integers that is already sorted in ascending order, find two numbers such that the ...

  3. [Swift]LeetCode378. 有序矩阵中第K小的元素 | Kth Smallest Element in a Sorted Matrix

    Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth ...

  4. [Swift]LeetCode790. 多米诺和托米诺平铺 | Domino and Tromino Tiling

    We have two types of tiles: a 2x1 domino shape, and an "L" tromino shape. These shapes may ...

  5. Nginx 动静分离与负载均衡的实现

    一.前提 企业中,随着用户的增长,数据量也几乎成几何增长,数据越来越大,随之也就出现了各种应用的瓶颈问题. 问题出现了,我们就得想办法解决,一般网站环境,均会使用LAMP或者LNMP,而我们对于网站环 ...

  6. app自动化问题点整理

    1.配置SDK环境发现adb无法生效: 解决方案: 这个问题一般就是你的环境变量没有配置好,很多同学比较容易出现的点就是win10系统的环境变量配置: 一定要注意打开path添加:%ANDROID_H ...

  7. HBase之Table.put客户端流程(续)

    上篇博文中已经谈到,有两个流程没有讲到.一个是MetaTableAccessor.getRegionLocations,另外一个是ConnectionImplementation.cacheLocat ...

  8. Linux 设置自启动服务

     0 为停机,机器关闭.(千万不要把initdefault设置为0 )    1 为单用户模式,就像Win9x下的安全模式类似.    2 为多用户模式,但是没有NFS支持.    3 为完整的多用户 ...

  9. [Abp 源码分析]四、模块配置

    0.简要介绍 在 Abp 框架当中通过各种 Configuration 来实现模块的配置,Abp 本身提供的很多基础设施功能的一些在运行时的行为是通过很多不同的 Configuration 来开放给用 ...

  10. Mysql篇--Linux中安装Mysql

    一.前述 由于Windows安装Mysql非常麻烦,所以分享一篇Linux中对MySQL的搭建,废话不多说,来,come on. 二.步骤 2.1 yum安装 yum install mysql-se ...