2

I am trying to create my first android project using cordova on my Windows 7 machine. I have installed latest Android SDK (API-19 installed) and cordova. I have set path for ANDROID_PATH, ANDROID_PLATFORM_TOOLS, ANDROID_TOOLS and ANT_HOME. Using directions from http://cordova.apache.org/docs/en/3.6.0//guide_cli_index.md.html#The%20Command-Line%20Interface I have created the "hello" project but as I try to add android platform using:

cordova platform add android

from my command prompt android emulator opens up showing android home screen, so I can navigate through the OS but soon as close it I get the output:

C:\devCenter\private\hello>cordova platform add android
Creating android project...

C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:126
                throw e;
                      ^
Error: Please install Android target "android-19".
Hint: Run "android" from your command-line to open the SDK manager.
at C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\lib\check_reqs.js:173:19
at _fulfilled (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:798:54)
at self.promiseDispatch.done (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:827:30)
at Promise.promise.promiseDispatch (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:7
at C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:574:44
at flush (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.3\package\bin\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:419:13)
Error: cmd: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\think ahead\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

C:\devCenter\private\hello>

There is no android directory created inside platforms in "hello" project. Can someone please help me in pointing what I am missing/doing wrong.

Sceenshot of SDK sceenshot of SDK

Window launched on "cordova platform add android" Window launched on "cordova platform add android"

EDIT: Adding environment values:

C:\devCenter\private\hello>set
ALLUSERSPROFILE=C:\ProgramData
ANDROID_HOME=C:\devCenter\sdk
ANDROID_PLATFORM_TOOLS=C:\devCenter\sdk\platform-tools
ANDROID_TOOLS=C:\devCenter\sdk\tools
APPDATA=C:\Users\think ahead\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMMPath=C:\Program Files\Lenovo\Communications Utility
COMPUTERNAME=THINKAHEAD
ComSpec=C:\Windows\system32\cmd.exe
configsetroot=C:\Windows\ConfigSetRoot
FP_NO_HOST_CHECK=NO
HerokuPath=C:\Program Files (x86)\Heroku
HOMEDRIVE=C:
HOMEPATH=\Users\think ahead
LOCALAPPDATA=C:\Users\think ahead\AppData\Local
LOGONSERVER=\\THINKAHEAD
NODE_PATH=;%NODE_PATH%;C:\Users\think ahead\AppData\Roaming\npm\node_modules;C:\Dev\Opa\lib\opa\stdlib;C:\Dev\Opa\lib\opa\stdlib\stdlib.qmljs;C:\Dev\Opa\lib\opa\static;C:\Users\think ahead\AppData\Roaming\npm\node_modules;C:\Dev\Opa\lib\opa\stdlib;C:\Dev\Opa\lib\opa\stdlib\stdlib.qmljs;C:\Dev\Opa\lib\opa\static;%APPDATA%\npm\node_modules
NUMBER_OF_PROCESSORS=8
OPABASEDIR=C:\Dev\Opa
OS=Windows_NT
Path=C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Dev\Opa\bin;C:\mongodb\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Common Files\Lenovo;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MIT\Kerberos\bin;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Ruby193\bin;C:\Windows\System32;C:\SocketeQ\windowsandroid_root\system\bin;C:\SocketeQ\windowsandroid_root\system\lib;C:\Program Files\MIT\Kerberos\bin;C:\Program Files (x86)\HMA! Pro VPN\bin;C:\Users\think ahead\AppDa
ta\Roaming\npm
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.JS;.JS;.RB;.RBW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3a09
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
READYAPPS=C:\SWTOOLS\ReadyApps
SESSIONNAME=Console
SSH_AGENT_PID=371780
SSH_AUTH_SOCK=/tmp/ssh-vlsE376812/agent.376812
SWSHARE=C:\SWSHARE
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\THINKA~1\AppData\Local\Temp
TMP=C:\Users\THINKA~1\AppData\Local\Temp
TVT=C:\Program Files (x86)\Lenovo
TVTCOMMON=C:\Program Files (x86)\Common Files\Lenovo
USERDOMAIN=thinkahead
USERNAME=think ahead
USERPROFILE=C:\Users\think ahead
VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
windir=C:\Windows
WINDOWSANDROID_ROOT=C:\SocketeQ\windowsandroid_root
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log
vikramaditya234
  • 1,278
  • 2
  • 18
  • 37

0 Answers0