I am very new to Ionic2 app development and am trying to build an Android app with it. I want to run the app in Visual Studio emulator and am getting the below error while running 'cordova build android' command. Please help with it! Thanks in advance!
**C:\Devlopment ionic\sample\sampleapp>cordova build android
ANDROID_HOME=C:\Users\d.dutta.chowdhury\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
The system cannot find the path specified.
Error: cmd: Command failed with exit code 1**
just downgrade your android version to 5
cordova platform rm android
then
cordova platform add android@~5
it worked for me.
I got the same issue and used this command to build project to display entire log with which it is failing,
cordova build -d
it will show gradle path ,sdk path being used to run. In my case, gradle path was not present.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With