" android列表目标"启动模拟器

时间:2015-01-23 07:02:51

标签: android cordova

我正在尝试使用

创建新项目
cordova platform add android

但运行此命令启动android模拟器,关闭模拟器后,我收到消息

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

C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\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.4\package\bin\lib\check_reqs.js:174:19
    at _fulfilled (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\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.4\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.4\package\bin\node_modules\q\q.js:7
    at C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:574:44
    at flush (C:\Users\think ahead\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:442: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:766:16)
    at Process.ChildProcess._handle.onexit (child_process.js:833:5)

我在SDK管理器中安装了API-19。所以我检查了check_reqs.js并找到了发现API版本号为

的命令
android list targets

当我执行此命令时,android模拟器启动并且没有得到预期的列表,这里是输出:

C:\devCenter\project\new_app>android list targets
OSALSockMap::init: sock_map=0x003F0000
start /SocketeQ/windowsandroid_root//system/bin/plogd ... 2528

C:\devCenter\project\new_app>start /SocketeQ/windowsandroid_root//system/bin/socketbinder ... 5648
add (socketbinder, 0) to sockmap ok
start /SocketeQ/windowsandroid_root//system/bin/servicemanager ... 10164
[ on init ]
[ on boot ]
[ service netd ]
[ service vold ]
[ service surfaceflinger ]
[ service ril-daemon ]
[ service zygote ]
[ service media ]
[ service drm ]
[ service installd ]
reference-ril requires: -p <tcp port> or -d /dev/tty_device
android-start was killed
app_process was killed
servicemanager was killed
socketbinder was killed
Could not open pipe: 2 second wait timed out.Could not open pipe: 2 second wait timed out.Could not open pipe: 2 second wait timed out.Cou
surfaceflinger was killed
instld was killed
no process 'alogd' was killed
plogd was killed
netd was killed
vold was killed
bootanimation was killed
rild was killed
no process 'drmserver' was killed

好像我搞砸了我的环境如何表现。有谁知道问题可能是什么?

1 个答案:

答案 0 :(得分:0)

这是解决方案,检查是否有任何其他Android开发工具。就像我的情况一样,我安装了appcelerator,这在某种程度上搞乱了环境。一旦删除整个事情就像一个魅力。如果需要使用多个开发平台,我的建议是使用不同的分区。