2

OK. This may sound like I'm overly frustrated, because I am. I'm trying to build a Blackberry app for release for the guy I'm working for. I built the Android one just fine after adding a build config and adding the keystore. But then, well, even if I just run phonegap build blackberry 10, I get the following:

Javy@MacBookJ [/clientProject]$ phonegap build blackberry10
[phonegap] executing 'cordova build blackberry10'...
Running command: /clientProject/platforms/blackberry10/cordova/build --buildConfig=/clientProject/build.json



  error: unknown option `--buildConfig=/clientProject/build.json'



ERROR building one of the platforms: Error: /clientProject/platforms/blackberry10/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project

Error: /clientProject/platforms/blackberry10/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:817:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Javy@MacBookJ [/clientProject]$ 

My big problem is that I'm not even adding the buildConfig parameter, and Phonegap is just DOING IT ALL ON ITS OWN LIKE IT RUNS THE PLACE!

HELP???

Jay V
  • 121
  • 11

2 Answers2

4

For me, deleting my build.json (which I had used for android build) and then running the "cordova build blackberry10" command, solved the problem.

contactabbas
  • 832
  • 2
  • 11
  • 18
  • A year later and I'm still running into the same issues. Deleting my `build.json` file is not the best option, but at least I can still re-use my phonegap CLI in a more universal way. Anyone have info on why removing `build.json` helps? Or what parameters should be in that file, so maybe we can fill it in and get it working without hackish fixes? – Jay V Dec 05 '16 at 16:30
  • I've marked this as the correct answer as, at this time, the instructions below do not copy the www folder into the blackberry platform folder. Anyone trying _that_ fix will run into an issue where the www folder doesn't match. – Jay V Dec 05 '16 at 19:57
2

I have the same issue. You can solve this by calling the build.bat by yourself without any parameters inside your comandline(CMD). The build.bat is inside the blackberry10 folder:

Blackberry10 path

  1. Open you Phonegap projekt folder
  2. platforms folder
  3. blackberry10 folder
  4. cordova folder
  5. start the comandline tool inside this folder (CMD in windows)
  6. type: build.bat
  7. type: run.bat

build.bat only build the .bar files and run.bat deploys the app to your device.

Commandline in windows

Martin Godzina
  • 1,470
  • 11
  • 17
  • 1
    While this is an excellent answer and I am marking this as correct, it turns out that in my instance, the Phonegap and platform versions may have been misaligned. I had deleted the blackberry platform and re-added it from scratch and it worked fine for me. – Jay V Nov 30 '15 at 17:11