科尔多瓦平台添加android的错误 [英] Cordova platform add android error

查看:138
本文介绍了科尔多瓦平台添加android的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Ubuntu 12.04

Using ubuntu 12.04

cordova platform add android
Creating android project...

/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error: An error occured during creation of android sub-project. 

/home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:126
                    throw e;
                          ^
Error: An error occurred while listing Android targets
    at /home/admin/.cordova/lib/android/cordova/3.3.0/bin/lib/check_reqs.js:87:29
    at _rejected (/home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:808:24)
    at /home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:834:30
    at Promise.when (/home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:1079:31)
    at Promise.promise.promiseDispatch (/home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:752:41)
    at /home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:574:44
    at flush (/home/admin/.cordova/lib/android/cordova/3.3.0/bin/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:415:13)

    at /usr/local/lib/node_modules/cordova/src/platform.js:244:30
    at ChildProcess.exithandler (child_process.js:641:7)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

我是什么做错了吗?

What am I doing wrong?

推荐答案

简单的下载SDK,提取的地方,出口这条路,做源生效,然后继续...:)

Simple as download sdk, extract somewhere, export that path, do source to take effect, then continue... :)

须藤gedit中的〜/ .bashrc

添加"PATH=$PATH:/opt/adt-bundle-linux-x86_64-20140321/sdk/platform-tools:/opt/adt-bundle-linux-x86_64-20140321/sdk/tools"至底部。

请指定确保您的路径是正确的, ADT-束的linux-x86_64-20140321 根据你下载的版本变化。

make sure your path specified is correct., adt-bundle-linux-x86_64-20140321 changes according to the version you download.

源的〜/ .bashrc

取到当前会话的路径。

然后从你的build目录(我的是〜/ phoneGapBuild /你好)。

then from your build directory (mine is ~/phoneGapBuild/hello ).

科尔多瓦平台添加的android

(@)要查看当前的路径变量:

(@) To see current path variables:

回声$ PATH (如果您没有看到新添加的变量,请退出终端,然后再次打开它)

echo $PATH (If you don't see newly added variables, please exit terminal and open it again)

(@)如果你有像

错误:错误:执行命令蚁族,请确保您有蚂蚁   安装并添加到您的路径。

Error: ERROR : executing command 'ant', make sure you have ant installed and added to your path.

运行下面的注释安装蚂蚁。 sudo易于得到-u安装蚂蚁

run the following comment to install ant. sudo apt-get -u install ant

这篇关于科尔多瓦平台添加android的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆