Cannot re-add Android platform

Hello, I am trying to add Android as a platform for my project. I’m using Ubuntu and am getting this error:

=> Errors executing Cordova commands:         
                                              
   While adding platform Android to Cordova project:
   Error: /home/kristis/.cordova/lib/npm_cache/cordova-android/4.1.1/package/bin/create: Command failed with exit code 8 Error output:
   /home/kristis/.cordova/lib/npm_cache/cordova-android/4.1.1/package/bin/node_modules/q/q.js:126
   throw e;
   ^
   Package name must look like: com.company.Name
   at ChildProcess.whenDone (/home/kristis/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
   at ChildProcess.emit (events.js:98:17)
   at maybeClose (child_process.js:766:16)
   at Process.ChildProcess._handle.onexit (child_process.js:833:5)

I addition I would liek to say that this command actually worked fine a week ago - i used meteor remove-platform android prior to trying to re-add it. I did it because I was unable to get meteor started on either Android emulator or Android device.

How can i fix this problem?

EDIT: Tried re-installing Meteor - did not help

For future references: In my case i solved this issue by making sure that /cordova-build folder is removed from .meteor folder in your project.

2 Likes

That fixed it for me. Thanks!