Create an ANE file

Create the ANE package, which contains the ActionScript library, the shared object file, and few other important configuration files.

  1. Open the BlackBerry 10 Native SDK .
  2. In the Project Explorer, right click the NativeCode project.
  3. Select Export.
  4. Select BlackBerry > AIR Native Extension. Click Next.
  5. In the Base filename field type com.example.
  6. In the AIR SDK field, specify the location of the AIR SDK.
  7. In the Library SWC field, specify the location of the NativeAS3.swc file you created in the previous section. For more information see Create a Flex Library project using Flash Builder.
  8. Click Finish.

When the build process completes, you will see the com.example.ane file in the Project Explorer.

If you see an error message stating "Invalid swc file. The extension Namespace requires the SWF version to be 13 or lower." you will have to force the library's SWF version. For more information on forcing the SWF version, see Set SWF version using Flash Builder.

Set SWF version using Flash Builder

Complete the steps below only if you see an error message that states "Invalid swc file. The extension Namespace requires the SWF version to be 13 or lower.". You will have to force the library's SWF version using a compiler argument.

  1. Open Adobe Flash Builder.
  2. In the Package Explorer window, right-click the nativeAS3 project and select Properties.
  3. Click Flex Library Compiler.
  4. In the Additional compiler arguments field, type -swf-version 13.

  5. Click Apply.
  6. Click Ok to rebuild the swc file.