0

I'm trying to get the apk for android to release to the mobile store, but every time I try to build in release I get this error.

Reading build config file: C:\ProjectName\build.json
    1>  ERROR building one of the platforms: SyntaxError: Unexpected token 
    1>  You may not have the required environment or OS to build this project
    1>  SyntaxError: Unexpected token 

Now I've been following these instructions Package your Cordova App and it says to put all my keystore stuff into the build.json, but I didn't have one of those. I couldn't find a .json extension to add it, so I just used the .resjson but renamed it build.json. Then I added all my keystore stuff into that.

Anyone have any idea what i've done wrong? :(

IAMABANANA
  • 145
  • 2
  • 18
  • You are doing it correctly. The `build.json` file can be made through rename from any empty file. Please make sure the keystore is created correctly and the information that describes your key in `build.json` is also correct. – Elvis Xia - MSFT Jul 07 '16 at 01:40

2 Answers2

2

Make sure that you have the correct line endings in your build.json file.

On the File menu, choose Advanced Save Options, you can control it there.

enter image description here

Linda Z
  • 312
  • 1
  • 5
  • 1
    the recommended encoding for json is utf-8, and in any case, it should be a unicode compatible encoding, not cp1252 (ever). – njzk2 Jul 20 '16 at 19:04
0

You can look at this answer, it may be the same issue you're facing this

Community
  • 1
  • 1
Strickos9
  • 106
  • 4