Tag Archive for: android

Get the Android SDK & Phonegap to work

Getting the create Command to Work on PhoneGap 2.x Android. Huge thanks to Simon MacDonald

Start with the PhoneGap setup documentation here:

http://docs.phonegap.com/en/2.7.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android

Then fix it here:

http://simonmacdonald.blogspot.ca/2012/11/getting-create-command-to-work-on.html

If I only knew this sooner

Things that it would have been nice to know:

  1. Android package names can only contain letters & periods. NO NUMBERS or SPECIAL CHARACTERS
  2. PhoneGapBuild Keys cannot be edited or deleted, so be precise and descriptive in your naming conventions
  3. It is important for us to decide on a good structure for application versions/environments. Managing multiple installs on multiple devices, pointed at multiple server environments

Creating your .keystore file to sign your Android APK

The APK signing process for android, although much simpler than iOS IPA signing, can still be another challenge for first time app developers. Again, it’s all about finding the right starting point, and syntax.

To Create our keystore We will use the keytool.exe included in the Java JDK. Open a command-line and navigate to your Java bin directory. For Windows 7, mine is located at
C:Program Files (x86)Javajre7bin
Next, run the following command. Be sure to replace the NAME & ALIAS with your values.
keytool -genkey -v -keystore [NAME HERE].keystore -alias [ALIAS NAME HERE] -keyalg RSA -keysize 2048 -validity 10000
The keytool will prompt you for the other required information for the keystore, Like Name, location, and password, but it’s all very basic.

That’s it. The .keystore file will be placed in your java bin directory, and you’re ready to go.

Design Mode Problems Flash Builder 4.5.1

If you have tried to switch to Design Mode in Adobe Flash Builder 4.5.1 and see nothing but white, look at your Design Mode Problems tab: Window > Show View > Other > Flash Builder folder > Design Mode Problems.

If you see this message:

SWC file failed to load. Any component dependent on this SWC file will not be displayed in the Design Mode.

The SWC may have failed to load because of:

*  Incompatible definitions caused by usage of a different SDK version

*  Missing referred class definitions

Switching my SDK from 4.5.1 to 4.5 was a suitable workaround. In my case, my custom mobile skins library depends on sdks4.5.0frameworksthemesMobilemobile.swc which didn’t want to play nice with 4.5.1 apparently.