Building applications that run on mobile is today’s trend. Everybody is thinking mobile and social and cloud.
To build a Flex application for Mobile is very easy, provided you use Flash Builder. When it comes to automating that build, things are not as easy. Because recently I’ve managed to overcome the obstacles that were preventing me to build a running Flex 4.5 app for mobile, I want to share the build.
I’ve taken the initial build from this thread. Marvin Froeder ( a.k.a VELO ) has been doing some hard work recently, creating the Enterprise version of Flex Mojos. This version seems pretty promising. I’m looking forward for its release. When you’re testing the build, make sure you register during the build, following the instructions. The process is fairly easy, but … rewarding. The maven build creates the final apk/air/exe/dmg…, which you can use to install the app on your device. It’s worth trying it.
To build the app, you need to execute
mvn3 clean install package
Prior to the build, you need to make sure you have Maven 3 installed, with the following environment variable:
MAVEN_OPTS="-Xmx1024m -Xms128m -XX:+DisableAttachMechanism"
Also, you need to have the mobile theme installed in a repository. As of today, the flex mojos repository doesn’t contain this theme, so you need to install it manually.
When the build ends, connect your device to the computer and execute:
adb install -r ./target/mobile-1.0-SNAPSHOT.apk
Then, go to your device and open “main” application.
If you see the following screen, it means that the application got compiled successfully.