"Error: Failed to parse json" when adding Android platform


#1

Hey, I’m trying to add android platform to a test app I am building and meteor comes up with the following error:

% Adding a platform android                   
Using (built-in) Android SDK at /home/daniel/.meteor/android_bundle/android-sdk
% Running synchronously:  /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh [ 'platform', 'add', 'android' ]
                                          
/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: Error running /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cordova-scripts/cordova.sh
Unable to fetch platform android: Error: Failed to parse json
Unexpected token �


at execFileSyncOrThrow (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:272:11)
at /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:428:7
at Array.forEach (native)
at Function._.each._.forEach (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
at ensureCordovaPlatforms (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:422:5)
at /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:3020:5
at /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:327:18
at [object Object]._.extend.withValue (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:326:36
at [object Object]._.extend.withValue (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/fiber-helpers.js:115:14)
at Object.enterJob (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/buildmessage.js:317:26)
at Command.main.registerCommand.name [as func] (/home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/commands-cordova.js:3015:16)
at /home/daniel/.meteor/packages/meteor-tool/.1.1.3.5gs6ii++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js:1363:23

I tried install-sdk android again (everything looks fine up to this point), followed by add-platform android and the error persists.

Then I tried completely removing and re-installing openjdk7, just to be sure, maybe a bit overkill… retried install-sdk and add-platform and I keep getting the same error.

Just found this error is not specific to my test app, it is happening with every app I try to add-platform android, including test apps localmarket and todos. Meteor install-sdk android executes flawlessly, I havent got a clue as to what is happening here.