Astraport
Astraport

Reputation: 1257

Licensing Adobe AIR applications on Android

I create a test application on the basis of this article: http://www.adobe.com/devnet/air/articles/android-licensing-native-extensions.html

All goes well until these lines - compilation error.

Flash Builder screenshot

Add an Extension ID tag following the application tag:

<extensions>
<extensionID>com.adobe.air.sampleextensions.android.licensing</extensionID>
</extensions>

I put the line directly to app description XML. If I do not insert these lines when I build with ADT I get error:

Invalid extension descriptor: extension.xml

My extension.xml:

<extension xmlns="http://ns.adobe.com/air/extension/3.1">
  <id>com.adobe.air.sampleextensions.android.licensing</id>
  <versionNumber>1.1.0</versionNumber>
  <platforms>
    <platform name="Android-ARM">
      <applicationDeployment>
        <nativeLibrary>SampleAndroidLicensing.jar</nativeLibrary>
        <initializer>com.adobe.air.sampleextensions.android.licensing</initializer>
        <finalizer>com.adobe.air.sampleextensions.android.licensing</finalizer>
      </applicationDeployment>
    </platform>
    <platform name="default">
        <applicationDeployment/> 
    </platform>
  </platforms>
</extension>

I use ADT command to package the ANE file:

adt -package -storetype pkcs12 -keystore C:\PackageAL\temp.p12 -keypass mypassword -target ane com.adobe.air.sampleextensions.android.licensing.ane extension.xml -swc AndroidLicensingLib.swc -platform Android-ARM -C .\Android-ARM\ .

Upvotes: 0

Views: 1364

Answers (1)

Andrei Fecioru
Andrei Fecioru

Reputation: 106

When ADT gives the following error: 'Invalid extension descriptor: extension.xml', it does not mean that the native extension descriptor file is syntactically incorrect. Unfortunately, this is a misleading error message. What happens is that the path to the descriptor XML file is invalid (the file cannot be found). It should say something like: "Cannot find descriptor file: extension.xml".

Make sure that when you invoke the ADT tool, you provide the full (absolute) path to your descriptor file.

Additional note: when ADT fails to parse the descriptor file it will provide you with a more descriptive error message pointing the exact line where the error occurs. However, this is not your case.

Upvotes: 1

Related Questions