Flash Games on Android Devices: The Adventure Begins

During Black Friday, I picked up an ASUS Eee Pad Transformer (yes, I know a new one is coming soon, but it was hard to pass up at the price). I've always been curious about creating games for Android and touch screen devices, but I haven't had the time to learn the tools and process needed to do so.

It turns out it's not difficult at all to get a Flash game up-and-running on an Android device using freely available tools. In fact, Joseph O'Connor has a wonderful set of video tutorials on how to do just that.

I would have gotten my test project up-and-running within an hour if not for a roadblock I hit when packaging the Air app. I got the following error while running the PackageAPK.bat file:

Could not generate timestamp: handshake alert: unrecognized_name

After scouring the web for an explanation of this issue, it appears this has something to do with a change made in Java 7. It works perfectly fine in Java 6. To fix this, you have to edit the adt.bat (the file the PackageAPK.bat file calls to do the grunt work) to use Java 6. To do this:

  1. Find the directory you copied over the latest Adobe Air SDK into for FlashDevelop (this should be the Tools\flexsdk in your FlashDevelop directory).
  2. Open the bin folder.
  3. Open adt.bat as an Administrator in Notepad or your text editor of choice.
  4. Replace @java with the direct link to java.exe in Java 6 directory. For Windows 7 64-bit users, this is probably "C:\Program Files (x86)\Java\jre6\bin\java". For other Windows users, this is probably "C:\Program Files\Java\jre6\bin\java". In either case, make sure to include the quotes.

Do that before packaging the app and everything should work great.

Next up: making my first-ever game for touchscreens.