Project Setup

Basically, all you need to create AIR mobile project in IntelliJ IDEA is to create a module of ‘ActionScript/Flash/Flex’ type that uses SDK of ‘AIR Mobile’ type. Just go through simple steps using File | New Project wizard. When doing it first time you need to click […] button and add AIR Mobile SDK pointing to the Flex SDK 4.5 installation.

As soon as a project is created it is recommended to configure default run configurations for the project. Click Run | Edit Configurations, expand ‘Defaults’ node and select ‘AIR Mobile’ run configuration. For example, if by default you are going to debug applications on Android device over USB you should set options in the same way as on the following screenshot.

Now write some code, connect your device to the computer and launch the application.

In a few seconds the application will start on the device!

If you need to use custom AIR application descriptor file – generate it using Tools | Flex | Generate AIR Application Descriptor action and then update it in a way you need. Create run configuration based on your descriptor file (in opposite to the example above where ‘MobileApp2’ run configuration is based on application main class and descriptor file is generated by on the fly).

To package native Android application as well as iOS application use Tools | Flex | Package Mobile AIR Application.

Are they plans to support the same for iOS devices when Flex support its? The unreleased dev builds of Flash Builder support deploying / development on the iOS platform so I’m hoping as soon as they do, IDEA adds support for it to.

Also can you clarify that the primary difference between Flex mobile development using Flash Builder 4.5 and IDEA will the the WYSIWYG UI builder in Flash Builder? Or will there be other functional gaps?

@James: Packaging of.ipa applications for iOS devices will be available in the next EAP (see Tools | Flex | Package Mobile AIR Application). To install it on the device you can use iTunes. Of course iOS and Blackberry support will be improved. MXML UI designer for IDEA is in progress. IDEA’s unbeaten advantage is great coding assistance. Any missing functionality will be added by user’s requests.

@Fleix I can’t find a typo. Indeed there are mentions of both 4.5.0.17689 and 4.5.0.19786 because the first one contains mobile components and the second one contains debugger that communicates with Android devices over USB.

I just tried this, but it does not work. The version that you can download now is 4.5.0.20967, but there seems to be no ‘MobileApplication’ class in there. There is a ‘mobilecomponents.swc’ but that does not seem to contain much.