Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap

What are the eight life cycle hook functions of Vue>>>

error reporting after ionic build Android

After ionic upgrades the plug-ins of splash screen and static bar, it will always report packaging errors when executing ionic build Android. The reason is that the lower version of Android platform does not support the new splash screen and statusb ar plug-ins

The solution is: [email protected] just add the version number before adding the Android platform

However, there are some new problems: error occurred during initialization of VM could not reserve enough space for 2097152kb object heap

  

1. At this time, I report that the virtual memory is insufficient because my computer is a 32-bit win7. After testing, the 64 bit win7 does not have this error. Generally, the memory is insufficient. Java’s method is to go to eclipse’s option and modify the JRE parameter value

2. However, ionic’s approach is a little different: in 0 [email protected] After , there will be a file gradlebuilder.js in the folder of platforms/Android/Cordova/lib/builders

3. Open the file in Notepad and find args. Push (‘- dorg. Gradle. Jvmargs = – xmx2048m’) turn this 2048m down, depending on your machine, I set it to 256M

4. If args. Push (‘- dorg. Gradle. Jvmargs = – xmx258m’) is not found then add this code before the return in the gradlebuilder. Prototype. Getargs function

5. Finally, execute ionic build Android to package as before

Similar Posts: