Phonegap run android - create a command with exit code 8 - linux

I did some googleing but found nothing. Any help appreciated. Try this with bare vm to be sure without installing or having problems installing nodejs.

Christian

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 
+7
android cordova
source share
3 answers

I ran into the same problem, the problem is that the path to the sdk tools was not configured correctly:

So try the following:

 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 
+20
source share

I also got into the same problem, but just adding various catalogs of sdk tools for Android to the path, as suggested by D.K. Mudrechenko suggested above, this did not help. It turned out that I did not install ant correctly. I downloaded it from apache.org and simply added the ant 'bin' folder to my path, but apparently it was not enough. However, after removing this entry from my path statement and adding ant via brew, I was able to successfully build the android cordova project using the "corova build android" command.

+1
source share

I ran into this problem and turned it off only in order to understand that the assembly is not performed for other errors in the code / configuration. the process you performed skips the part where the Android platform is added.

 corodova platforms add android 

in the steps above, you created a project that went to the project directory, and then started the assembly, in which the phone space checked the installed sdks, checked ANDROID_HOME and tried to configure the project for Android.

you can run it in the correct order:

  • create project
  • go to the project directory
  • add platform
  • build / run.

Hope this helps

+1
source share

All Articles