我做了一些googleing但没有发现任何相关内容.
任何帮助赞赏.请务必使用裸体vm进行尝试
没有nodejs安装或依赖问题.
任何帮助赞赏.请务必使用裸体vm进行尝试
没有nodejs安装或依赖问题.
基督教
sudo apt-get install nodejs sudo apt-get install nodejs-legacy sudo npm install -g phonegap sudo npm install -g cordova sudo apt-get install ant chris@mint16 ~/project/dev $phonegap create my-app [phonegap] create called with the options /home/chris/project/dev/my-app com.phonegap.helloworld HelloWorld [phonegap] Customizing default config.xml file [phonegap] created project at /home/chris/project/dev/my-app chris@mint16 ~/project/dev $cd my-app/ chris@mint16 ~/project/dev/my-app $phonegap run android [phonegap] detecting Android SDK environment... [phonegap] using the local environment [phonegap] adding the Android platform... /home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:126 throw e; ^ Error: An error occurred while listing Android targets at /home/chris/.cordova/lib/android/cordova/3.5.0/bin/lib/check_reqs.js:87:29 at _rejected (/home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:808:24) at /home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:834:30 at Promise.when (/home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:1079:31) at Promise.promise.promiseDispatch (/home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:752:41) at /home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:574:44 at flush (/home/chris/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:108:17) at process._tickCallback (node.js:415:13) { [Error: /home/chris/.cordova/lib/android/cordova/3.5.0/bin/create: Command Failed with exit code 8] code: 8 } [error] /home/chris/.cordova/lib/android/cordova/3.5.0/bin/create: Command Failed with exit code 8
解决方法
我刚刚面临同样的问题,问题是没有正确设置sdk工具的路径:
请尝试以下方法:
export PATH=$PATH:/usr/local/adt-bundle/sdk/tools export PATH=$PATH:/usr/local/adt-bundle/sdk/platform-tools export PATH=$PATH:/usr/local/adt-bundle/sdk/build-tools