Using Flash Builder 4.5.1 to compile an AIR App that uses a native extension

To use a native extension in an AIR application, you have these three tasks to do:

  1. Declare the extension in your application descriptor file.
  2. Include the ANE file in your application’s library path.
  3. Package the application.

This post is about Step 2 with regard to Flash Builder 4.5.1 projects.

Native extensions are packaged in ANE files. To compile an AIR application that uses a native extension, include the ANE file in the Flash Builder project’s build path.

In Flash Builder 4.5.1, do the following steps:

  1. Change the filename extension of the ANE file from .ane to .swc.
  2. Select Project > Properties on your Flash Builder project.
  3. Select the Flex Build Path in the Properties dialog box.
  4. In the Library Path tab, select Add SWC….
  5. Browse to the SWC file and select Open.
  6. Select OK in the Add SWC… dialog box. The ANE file now appears in the Library Path tab in the Properties dialog box.
  7. Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.
  8. In the Library Path Item Options dialog box, change the Link Type to External.

Now you can compile your application using, for example, Project > Build Project.

The part about changing the ANE file’s file extension from .ane to .swc is not strictly necessary. In step 4 above, when you browse to find the file, in the “Choose a SWC file” dialog box, you can change the setting of the Files Of Type drop-down field. It is set by default to *.swc.  Change it to *.*.

Now you can choose the ANE file. Then, continue with step 5 above.

However, when you build your Flash Builder 4.5.1 project with an ANE file rather than a SWC file, you get compiler warnings. The first warning is on the import statement for the extension class, saying that the extension could not be found. Successive warnings occur when you use the extension’s classes.

But interestingly, the application still builds and runs successfully.

Note: Adobe recommends using the next version of Flash Builder for developing native extensions for Adobe AIR. Sign up now to get access to the prerelease of Flash Builder 4.6.

For more information about using a native extension in your AIR application, see Using native extensions in AIR applications.

Detailed documentation about creating extensions is at Developing native extensions for Adobe AIR.

2 Responses to Using Flash Builder 4.5.1 to compile an AIR App that uses a native extension

  1. Pingback: AIR Native Extensions mit FDT –

  2. Ashish Sharma says:


    I am facing the implementation issue with the plugin. Whenever i am trying to create a build for IOS i am getting the error message “An implementation for native extension ‘com.adobe.nativeExtensions.Networkinfo’ required by the application was not found for the target platform.”

    I tried the build creation process by command line as well as by Flash builder Export Release Build option and faced same problem.

    I already imported the swc file of this native extension in my app and it is showing in “Referenced Library” section

    Please suggest.