Theo
Theo

Reputation: 3149

Running ionic apps in an Android Emulator.

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

Answers (2)

CrsCaballero
CrsCaballero

Reputation: 2348

Use this commands on console

  1. npm install -g npm
  2. npm install -g ionic cordova
  3. npm install -g angular-cli

and setting the "Environment Variables"

  1. JAVA_HOME
  2. ANDROID_HOME
  3. AVD

Upvotes: 1

Sunny Doshi
Sunny Doshi

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

Related Questions