在 Android 上许可 Adob​​e AIR 应用程序

发布于 2025-01-04 05:05:18 字数 1743 浏览 2 评论 0原文

我根据本文创建了一个测试应用程序: http://www.adobe.com/devnet/air/articles/android-licensing-native-extensions.html

一切顺利,直到这些行 - 编译错误。

Flash Builder 屏幕截图

在应用程序标记后添加扩展 ID 标记:

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

我将该行直接放入应用程序描述 XML 中。如果我在使用 ADT 构建时不插入这些行,则会出现错误:

无效的扩展描述符:extension.xml

我的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>

我使用ADT命令打包ANE文件:

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\ .

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\ .

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泛滥成性 2025-01-11 05:05:18

当 ADT 给出以下错误:“无效的扩展描述符:extension.xml”时,并不意味着本机扩展描述符文件在语法上不正确。不幸的是,这是一个误导性的错误消息。所发生的情况是描述符 XML 文件的路径无效(找不到该文件)。它应该显示如下内容:“找不到描述符文件:extension.xml”。

确保在调用 ADT 工具时提供描述符文件的完整(绝对)路径。

附加说明:当 ADT 无法解析描述符文件时,它会向您提供更具描述性的错误消息,指出发生错误的确切行。然而,这不是你的情况。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文