01-18-2011 10:52 PM - edited 01-18-2011 10:53 PM
I'm new to the BlackBerry community, BlackBerry development, et al. Today I downloaded the SDK to test the TabletOS 0.9.2 simulator, but I have already spent several hours trying to get anything to run without luck.
The simulator installed with no apparent issues. I've been reading the forums today and I have had none of the problems that others have mentioned, such as a screen freezes or problems during boot up.
I am using a trial version of VMWare Fusion 3.1.2 under Mac OS X 10.6.6.
I don't have Adobe Flash Builder, so I'm using TextWrangler. I wrote an applescript that, upon saving my actionscript file, invokes a perl script (I know, sounds redundant but it works) and does the compilation for me as posted by Taylor Byrnes (amxmlc, blackberry-airpackager). I am able to talk to the simulator as my compilation output doesn't show any errors (as far as I know), but my application pops up in the simulator without the icon I provided.
When the application launches, all I get is an off-centered white screen with no content on it.
I also compiled the HelloWorld example provided. What I got was another application in the simulator with the default icon that did the exact same thing: Show an off-centered white screen. Every time I recompile either script with minor changes, the icons in the simulator flash for a millisecond, and then I get the same off-centered white screen.
Has anyone experienced anything like that? Any clues?
There's obviously something I must be doing wrong. I can post my command-line arguments and the script if that helps. I have tested my swf file in the Flash Player app and it shows up fine. All I have there is a red Sprite with a TextField on top.
Sorry for the verbosity and thanks for any help you can provide.
Solved! Go to Solution.
01-19-2011 12:40 AM - edited 01-19-2011 12:44 AM
Are there are any spaces in folder names anywhere in the path to your project on your computer? If so try to migrate your development to a folder that does not have any spaces in any folder names anywhere in its path. This may not be the cause of the problem but in any case you should eliminate it as a possibility. Windows users are discouraged from using the typical C:\Documents and Settings directory for Playbook project dirs.
The other thing that has tripped up some folks using command line builds is how picky the tools are. In your commandline, try using the -C option, and making sure it is between -package <package name>.bar and -installApp:
I.e. instead of:
blackberry-airpackager -package HelloWorld.bar -installApp -launchApp HelloWorld-app.xml HelloWorld.swf [ICON FILE NAME] -device [PLAYBOOK IP ADDRESS] -password [SIMULATOR PASSWORD]
blackberry-airpackager -package HelloWorld.bar -C [YOUR PROJECT WORKING DIR} -installApp -launchApp HelloWorld-app.xml HelloWorld.swf [ICON FILE NAME] -device [PLAYBOOK IP ADDRESS] -password [SIMULATOR PASSWORD]
In the 0.9.1 SDK the airpackager was fussy about the order of commandline options. I am not on 0.9.2 yet but did not see anything in the release notes about them having fixed this.
Edit: Note; I never got an off center white screen w/any of my commandline compile adventures, but before I had the "correct" commandline incantation, I did get apps that showed a splash screen and then just went away. I'm on Windows (XP SP3) btw.
01-19-2011 02:39 PM - edited 01-19-2011 02:41 PM
Thanks for your time and your clear suggestions.
It finally worked, thanks to your suggestion to use the -c option. I still struggled for a good hour and a half, until I tried the -c option PLUS absolute paths. It didn't have anything to do with whitespace (in my case), as I didn't have any in my path and additionally it was double-quoted.
It was actually a mistake that I left the -c option there. I had already given up, returned everything back to normal (and forgot to erase the -c option), and started writing you a reply, when I did a final try and my application showed up with my own icon.
To verify, I eliminated the -c option and left the absolute paths. I got the previous issue again. Put the -c option and absolute paths back on, and it worked like a charm again. Like magic!
lackberry-airpackager" -package "/blackberry-test/AIRHelloWorld.bar" -installApp -launchApp "/blackberry-test/AIRHelloWorld-app.xml" "/blackberry-test/AIRHelloWorld.swf" "/blackberry-test/blackberry-tablet-icon.png" ...
Tried with no luck:
ackberry-airpackager -package AIRHelloWorld.bar -c /blackberry-test -installApp -launchApp AIRHelloWorld-app.xml AIRHelloWorld.swf blackberry-tablet-icon.png ...
Final, working command:
lackberry-airpackager" -package "/blackberry-test/AIRHelloWorld.bar" -c "/blackberry-test" -installApp -launchApp "/blackberry-test/AIRHelloWorld-app.xml" "/blackberry-test/AIRHelloWorld.swf" "/blackberry-test/blackberry-tablet-icon.png" ...
Note: I prefer double quotes to avoid any whitespace issues. Since the command is automatically generated, I don't have to tinker it in case one day I have whitespace in my path.
Thanks a lot!