Search code examples
actionscript-3airapkosx-snow-leopardflex-mobile

Captive Runtime is always included on Flex 4.6 + Air SDK 3.8


Adobe recently announces its new release for Air SDK 3.8. So we have used this for our mobile application to be able to use ServerSocket API which is used by our created library. Upon exporting the release build, the apk size becomes 13.3MB which is quite bigger compared to 3.2MB (using the default Flex SDK 4.6 with Air 3.1).

When I overlay AIR SDK 3.8 on Flash Builder 4.6, I do the following:

  1. Exit Flash Builder 4.6
  2. Download AIR SDK 3.8 from http://airdownload.adobe.com/air/mac/download/3.8/AdobeAIRSDK.tbz2
  3. Backup Flash Builder 4.6 by copying the entire directory.
  4. Extract AIR SDK by using The Unarchiver.
  5. Go to /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/ and copy 4.6.0 folder then rename it to 4.6.0 + 3.8
  6. Run the command:
    sudo ditto AdobeAirSDK/ /Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0\ + \3.8/
  7. Update application descriptor to:
    <application xmlns="http://ns.adobe.com/air/application/3.8">

Have I misconfigured something? Reverting back to 3.1 exports 3.2MB.

If I will be using Air SDK 3.1 and will run my app on an Android device with Air 3.8 runtime, will ServerSocket still work?

When I export a release build for iOS, there's no difference on its ipa size. When using 3.1, ipa size is 11.9MB; using 3.8 still yields 11.9MB. So what happens to Android releases on AIR SDK 3.8?

It's kinda strage that the apk size is greater than the ipa size. When exporting for iOS release, 8MB - 10MB is added to the app size since the application exported has a captive runtime (iOS does not support shared AIR Runtime). So what happens to Android releases on AIR 3.8?


On exporting a release build for , captive runtime is always included no matter what you choose on Export Options (Export application with captive runtime or Export application that uses a shared AIR runtime). Well, the good thing about captive runtime is that you don't have to require your user to install Adobe Air.


Solution

  • Adobe changed the packaging for Android in AIR 3.7. Android packages are now standard captive-runtime and the packager will warn you with something like this:

    Note: the AIR SDK no longer supports packaging android applications for use with the shared Runtime.
    The application has been packaged with a captive Runtime`

    From the documentation (http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac-4f1413de12cd45ccc23-8000.html):

    Note: (AIR 3.7 and higher) By default, ADT packages a captive copy of the AIR runtime with your Android app. To force ADT to create an APK that uses an external runtime, set the AIR_ANDROID_SHARED_RUNTIME environment variable to true.

    I have not tried to set that variable myself so I don't know if that actually enables you to package normally.