4

I am trying to build an apk for my Ionic 2 project and when I run Ionic build android i get an error:

Exception in thread "main"  java.lang.runtime exception could not load wrapper properties from "C:\Users\Naomi Gloria\CampoApp\platforms\android\gradle\wrapper" 

I have set the environment for JAVA_HOME and ANDROID_HOME and followed all other requirements but i still get the error.

I am not using a network with proxy so I do not think that could be the problem.

I am using the following versions:

Cordova 6.5.0 -- npm 3.10.0 -- ionic 2.2.1 -- node 6.10.0 -- android 6.1.0

on Windows 7 professional

Screenshot

Can someone please help?

Dirk
  • 3,030
  • 1
  • 34
  • 40
  • https://stackoverflow.com/questions/36328422/getting-a-loading-wrapper-properties-error-in-android – CaptainHere May 27 '17 at 19:02
  • @CaptainHere I already downloaded gradle 2.2.1.zip, put it in local folder and edited the directory in gradlebuilder file. – Naomi Gloria May 27 '17 at 19:06
  • I have managed to remove the above but still when i run **ionic build android** i get the following error >ERROR: failed to instantiate GradleBuilder builder: syntaxerror: unexpected token : I have downloaded gradle.zip file and edited the path in gradlebuilder file but i still get the same error. 1. What might be the problem? 2. Or do i need to edit gradle.builder? – Naomi Gloria May 27 '17 at 21:04
  • https://stackoverflow.com/a/43677221/4826457 – Suraj Rao May 28 '17 at 04:01

2 Answers2

1

I had the same error, what I did was to delete the android folder in the platform folder and I ran ionic cordova build android. Hope this help. Thank you

phemyadex
  • 11
  • 3
0

Most likely this issue is due to java doesn't have enough run time memory to compile actually i have face the same issue on Windows 7 so after searching a lot i found solution. and it just to increase Run time memory of JAVA.

Hope you know the process of increasing java run time memory. If not please let me know.

Ak-Wahid
  • 69
  • 3