“phonegap run android”在使用ubuntu执行后我得到了异常。任何人都告诉我我在哪里做错了。我在google上搜索但没有得到解决方案。
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] adding the Android platform...
/home/user166/.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/user166/.cordova/lib/android/cordova/3.4.0/bin/lib/check_reqs.js:87:29
at _rejected (/home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:808:24)
at /home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:834:30
at Promise.when (/home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:1079:31)
at Promise.promise.promiseDispatch (/home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:752:41)
at /home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:574:44
at flush (/home/user166/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:343:11)
{ [Error: /home/user166/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 1]
stack: 'Error: /home/user166/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 1\n at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/src/superspawn.js:112:23)\n at ChildProcess.EventEmitter.emit (events.js:110:17)\n at maybeClose (child_process.js:991:16)\n at Process.ChildProcess._handle.onexit (child_process.js:1058:5)',
code: 1 }
[error] /home/user166/.cordova/lib/android/cordova/3.4.0/bin/create: Command failed with exit code 1