我正在尝试用phonegap运行android应用程序,我使用的是Ubuntu 13.10,我有以下问题:
quest@quest:~/my-app$ phonegap run android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
/home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:126
throw e;
^
Error: An error occurred while listing Android targets
at /home/quest/.cordova/lib/android/cordova/3.4.0/bin/lib/check_reqs.js:87:29
at _rejected (/home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:808:24)
at /home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:834:30
at Promise.when (/home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:752:41)
at /home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:574:44
at flush (/home/quest/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:415:13)
[error] /home/quest/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 8
e/quest/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 8
quest@quest:~/my-app$ brew install ant
Warning: ant-1.9.3 already installed
和Here is the PATH
quest@quest:~/my-app$ echo $PATH
/home/quest/.linuxbrew/bin:/home/quest/.linuxbrew/bin:/home/quest/.linuxbrew/bin:/home/quest
/adt-bundle/sdk/tools:/home/quest/adt-bundle/sdk/platform-tools:/home/quest/android-sdk-
linux/platform-tools:/home/quest/android-sdk-
linux/tools:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
:/bin:/usr/games:/usr/local/games:adt-bundle-linux-x86_64-20131030/sdk/tools:adt-
bundle/sdk/tools:/Downloads/adt-bundle/sdk/platform-tools:/Downloads/adt-
bundle/sdk/tools:/Downloads/adt-bundle/sdk/platform-tools:/Development/adt-
bundle/sdk/tools:/usr/local/jdk/bin:/usr/local/ant/bin:/home/quest/ant/bin
请使用以下命令检查您的系统路径
echo $PATH
,并确保添加了ant路径。