I did install ionic and cordova via npm without errors, then I run these commmands:
ionic start test tabs --> without errors
cd test
ionic serve --> without errors, open a browser and app works great
q --> to quit ionic serve
ionic platform add android --> without errors
ionic build android --> and then, I found these errors:
add to body class: platform-android
ERROR building one of the platforms: TypeError: Cannot read property ‘1’ of null
You may not have the required environment or OS to build this project
Error: Cannot read property ‘1’ of null
I uninstall and re-install android sdk, ionic and cordova, and always the same error.
I have the same problem. Reinstalling JDK does not solve the problem. How can I found out more about this error? Is there a log somewhere, because all it says is “Error: Cannot read property ‘1’ of null”. There is no more information where this error originates from.
Uninstalling open JDK might resolve the problem, however does not given any insight why this happens. There might be an issue with ionic where other people can run into as well.