I am trying to build a signed release package for my Android application using Visual Studio 2015 Cordova Tools. I am using Cordova 5.1.1, which requires that I supply the build process with a build.json file, telling the application where the keystore are and what password is using. However when I add the build.json file, I am not able to make a successful build to release.
I followed this guide: https://github.com/Microsoft/cordova-docs/tree/master/tutorial-package-publish#android
And got this error (with path edited out):
1> ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk (TaskId:11)
1> JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55 (TaskId:11)
1> \build.json (TaskId:11)
1> Reading build config file: \build.json (TaskId:11)
1> \platforms\android\cordova\node_modules\q\q.js:126 (TaskId:11)
1> throw e; (TaskId:11)
1> ^ (TaskId:11)
1> SyntaxError: Unexpected token (TaskId:11)
1> at Object.parse (native) (TaskId:11)
1> at parseOpts (\platforms\android\cordova\lib\build.js:475:27) (TaskId:11)
1> at Object.module.exports.run (\platforms\android\cordova\lib\build.js:529:16) (TaskId:11)
1> at \platforms\android\cordova\build:36:22 (TaskId:11)
1> at _fulfilled (\platforms\android\cordova\node_modules\q\q.js:798:54) (TaskId:11)
1> at self.promiseDispatch.done (\platforms\android\cordova\node_modules\q\q.js:827:30) (TaskId:11)
1> at Promise.promise.promiseDispatch (\platforms\android\cordova\node_modules\q\q.js:760:13) (TaskId:11)
1> at \platforms\android\cordova\node_modules\q\q.js:574:44 (TaskId:11)
1> at flush (\platforms\android\cordova\node_modules\q\q.js:108:17) (TaskId:11)
1> at process._tickCallback (node.js:355:11) (TaskId:11)
1> Command finished with error code 1: cmd /s /c ""\platforms\android\cordova\build.bat" --release "--buildConfig=\build.json"" (TaskId:11)
1>ERROR building one of the platforms : error : cmd: Command failed with exit code 1
1> You may not have the required environment or OS to build this project (TaskId:11)
1>MDAVSCLI : error : cmd: Command failed with exit code 1
1>Done executing task "MdaVsCli" -- FAILED. (TaskId:11)
What am I doing wrong? It seems like it cant parse the JSON?