Reputation: 3149
I am new in ionic framework,and want to run the app I made into an Android emulator. I type this command,
ionic emulate android
and get this error.
Error: cmd: Command failed with exit code 1
I have all the path variables set up correctly I think.
PATH
C:\Program Files\Git\usr\local;C:\Users\W\AppData\Roaming\npm\node_modules\bower\bin;C:\Users\Theodosios\AppData\Roaming\npm;C:\Program Files (x86)\Java\jre1.8.0_111\bin
JAVA_OPTIONS
-Xmx512M
Any ideas what is wrong and how can it be fixed?
Thanks,
Theo.
Upvotes: 1
Views: 1230
Reputation: 2348
Use this commands on console
npm install -g npm
npm install -g ionic cordova
npm install -g angular-cli
and setting the "Environment Variables"
JAVA_HOME
ANDROID_HOME
AVD
Upvotes: 1
Reputation: 373
1) Options Remove android platfrom and install again.
Remove platform
$ cordova platform remove android
Add Platform
$ cordova platform add android
2) Options
Open SDK manager => Run as administrator
You will require:
1) SDK Platform
2) Android SDK Platform-tools
3) Andoid SDK tools
Upvotes: 0