Can't build app on Windows


Basically topic. I used to be able to at least run the app with “ionic run android” and have it on my phone, but now I can’t build it. i get this error:

I’ve verified that my JVM is working with a java command, so I have absolutely no idea what’s wrong. Cordova, Android_Home have all been set up. The machine is Windows 64-bit but I’m running 32-bit Java, if it helps.

EDIT: I managed to make the JVM error disappear in two ways:

  1. set a _JAVA_OPTIONS environment variable with value -Xmx512M
  2. I discovered that I had a 64-bit Java installation. Changing my JAVA_PATH to point to that solved the JVM issue.

I still cannot resolve the ENOENT error though.


Top voted comment on this link fixed my issue:

[quote] I am not sure how this resolved the issue but try this out it will resolve for sure.

This is due to ANT tools could not find tools.jar in JRE lib directory. When I copied tools.jar from JDK lib directory to JRE lib directory. Restart the system and the problem was absolutely solved and the build was successful when I ran the command “cordova -d platform add android”. Hope this helps you.[/quote]

I have no idea how the file was lost overnight but here you go. Maybe someone can figure out why it broke.