Android command for Ionic Framework not working on Windows 8 CLI?

I am on Windows 8 and am following how to install and use Cordova with Ionic Framework on Windows 8.1. I watched the video here: http://learn.ionicframework.com/videos/windows-android/ . I am stuck in a 5:58 video where the SDK Manager is supposed to show up when I type "android" at the command line, but it talks about this unrecognizable command. I made sure my file directories are accurate. What else am I missing? How do I fix this problem?

PATH
C:\Users\Jaime\AppData\Roaming\npm; C:\Program Files\Java\jdk1.8.0_25\bin; C:\Development\AndroidSDK\sdk\platform-tools; C:\Development\AndroidSDK\sdk\tools; C:\Development\ApacheAnt\bin; C:\Program Files\nodejs

      

Thank!


Android command problem:

C:\Users\Jaime\myapp>ionic platform add android
npm http GET https://registry.npmjs.org/cordova-android/3.6.4
npm http 200 https://registry.npmjs.org/cordova-android/3.6.4
npm http GET https://registry.npmjs.org/cordova-android/-/cordova-android-3.6.4.
tgz
npm http 200 https://registry.npmjs.org/cordova-android/-/cordova-android-3.6.4.
tgz
Creating android project...

C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_mod
ules\q\q.js:126
                    throw e;
                          ^
Error: ANDROID_HOME is not set and "android" command not in your PATH. You must
fulfill at least one of these conditions.
    at C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\l
ib\check_reqs.js:159:19
    at _fulfilled (C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\p
ackage\bin\node_modules\q\q.js:798:54)
    at self.promiseDispatch.done (C:\Users\Jaime\.cordova\lib\npm_cache\cordova-
android\3.6.4\package\bin\node_modules\q\q.js:827:30)
    at Promise.promise.promiseDispatch (C:\Users\Jaime\.cordova\lib\npm_cache\co
rdova-android\3.6.4\package\bin\node_modules\q\q.js:760:13)
    at C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\n
ode_modules\q\q.js:821:14
    at flush (C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\packag
e\bin\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:902:3
Error: C:\Users\Jaime\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\c
reate.bat: Command failed with exit code 8
    at ChildProcess.whenDone (C:\Users\Jaime\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

      


Update:

Here's what I have so far:
USER variables:

name: PATH variable: C: \ Users \ Jaime \ AppData \ Roaming \ NPM; C: \ Program Files \ Java \ jdk1.8.0_25 \ Bin; C: \ Development \ AndroidSDK \ SDK \ Platform Tools; C: \ Development \ AndroidSDK \ SDK \ tools; C: \ Development \ AndroidSDK \ SDK \ build-tools; C: \ Development \ ApacheAnt \ Bin; C: \ Program Files \ nodejs; % PATH%;% ANDROID_HOME% \ tools;% ANDROID_HOME% \ platform tools

System variables:

name: ANDROID
variable: C: \ Development \ AndroidSDK \ sdk

name: ANT
variable: C: \ Development \ ApacheAnt

name: JAVA
variable: C: \ Program Files \ Java \ jdk1.8.0_25

+3


source to share


1 answer


Phonegap and cordova installation procedures

why install?

1) node js download: http://nodejs.org/download/   We have node-v0.10.29-x64.msi (64 bit) installed. Once installed, open a command prompt and type "node -v" then "npm -v", these 2 commands should work without any error on the command line. Open Command Prompt - (press windows and the R key, then type cmd)

2) phonegap

http://phonegap.com/install/  Install the handset to cmd: type npm install -g phonegap to cmd After installation, the files will be placed in the C: \ Users \ Hari \ AppData \ Roaming \ npm folder. You can test the installation by entering the "phonegap -v" command at the command line.

3) java jdk   http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp

We have a jdk-8u5-windows-x64.exe file.

You may need to add path variables to My Computer -> Right Click -> Properties -> Advanced System Options -> Environment Variables

After installation, check the "java -version" checkbox on the command line. "where java" will help you determine the java installation path.

4) ant download: http://ant.apache.org/

We already have apache-ant -1.9.4-bin.zip portable version of Ant. We don't need to install, we just need to extract the zip file and put it somewhere safe.



You may need to add path variables to My Computer -> Right Click -> Properties -> Advanced System Settings -> Environment Variables Environment Variables Name: Ant_Home Example: C: \ Program Files \ apache-ant -1.9.4

5) android sdk download: http://developer.android.com/sdk/index.html  We have adt-bundle-windows-x86_64-20140624 / SDK Manager.exe file.

6) ionic cmd -> npm install -g ionic

7) Cordova cmd -> npm install -g cordova


SETTINGS

My Computer -> Right Click -> Properties -> Advanced System Settings -> Environment Variables Edit Path and give similar.

C: \ Users \ prabhu \ AppData \ Roaming \ npm; C: \ Program Files \ apache- ant -1.9.4 \ bin; C: \ phonegap_project \ adt-bundle-windows-x86_64-20131030 \ sdk \ tools; C: \ phonegap_project \ adt-bundle-windows-x86_64-20131030 \ sdk \ build-tools; C: \ Program Files \ Java \ jdk1.8.0_05 \ bin;

if JVM is not running
Set system variables Click "New" variable Name: _JAVA_OPTIONS variable value: -Xmx512M


+6


source







All Articles