Adobe Native Extensions——不工作? [英] Adobe Native Extensions -- not working?

查看:32
本文介绍了Adobe Native Extensions——不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Adobe Native Extensions"——Adobe Flash Builder 4.5 中发布的最新功能之一.我正在尝试借助 Adob​​e Native 扩展在 Adob​​e AIR 和 Windows 7 上的本机 C++ 应用程序之间进行通信.(当然,我们今天可以使用 NativeProcess API 来做到这一点,但 ANE 的功能要强大得多)

I am trying to work with "Adobe Native Extensions" - one of the newest features released in Adobe Flash Builder 4.5. I am trying to communicate between Adobe AIR and a native C++ application on Windows 7 with the help of Adobe Native extensions. (Of course, we can do this today with NativeProcess APIs, but ANE is much more powerful)

我按照以下文章中提到的步骤操作:http://thingsico.de/blog/tag/native-extensions/>

I followed the steps mentioned in the following article: http://thingsico.de/blog/tag/native-extensions/

  1. 使用 cygwin 创建示例 DLL 以编译 C++ 代码(在编译过程中集成了 FlashRuntimeExtensions.hFlashRuntimeExtensions.lib)
  2. 使用以下命令行构建 sampleANE.

  1. created the sample DLL using cygwin to compile the C++ code (integrated the FlashRuntimeExtensions.h and FlashRuntimeExtensions.lib during compilation)
  2. built the sampleANE using the following command line.

<代码>"C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\Air3.0_flex4.5.1\bin\adt" -package -storetype pkcs12 -keystore "certs\vlabCert.p12" -目标 ane "TestSampleANE.ane" "bin\extension.xml" -swc "bin\SampleAne.swc" -tsa none -platform Windows-x86 -C "bin"

我在这里遇到了一个小问题.时间戳,我通过将 -tsa none 添加到上述命令来导航.我能够成功生成 HelloAne.ane

I faced a small problem here w.r.t. timestamp, which I navigated by adding -tsa none to the above command. I was able to successfully generate the HelloAne.ane

  1. 我创建了一个新的示例 Flex 项目,并在项目的 lib 文件中包含了 TestSampleAne.aneSampleAne.swc.我能够成功访问 SampleAne 对象,以及它在 ActionScript 代码中的公共函数,并且可以成功编译应用程序.但是,当我尝试启动该应用程序时,出现以下错误:
  1. I created a new sample Flex Project, and included the TestSampleAne.ane and SampleAne.swc in the lib files of the project. I was able to successfully access the SampleAne object, as well its public functions in the ActionScript code, and could successfully compile the application. However, when I try to launch the application, it gives me the following error:

Process terminated without establishing connection to debugger.

Not supported native extensions profile

Launch command details:  "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\Air3.0_flex4.5.1\bin\adl.exe" -runtime "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\Air3.0_flex4.5.1\runtimes\air\win" E:\ANE\SampleAirProject\bin-debug\SampleAirProject-app.xml E:\ANE\SampleAirProject\bin-debug 

起初,我认为问题是由于我使用的是 Flash Builder 4.5,而不是 4.5.1(这是 Adob​​e 推荐用于 ANE 的).所以,我下载了补丁并升级了它.我什至检查过我的机器上是否有 AIR 3.0 运行时.但即便如此,问题还是一样.

At first, I thought that the problem is due to the fact that I was using Flash Builder 4.5, and not 4.5.1 (which is what Adobe recommends for working with ANE). So, I downloaded the patch and upgraded it. I even checked that I have AIR 3.0 runtime on my machine. But even then the problem remains the same.

推荐答案

Adding -profile extendedDesktop to launch command or the following line to application descriptor XML file (application.xml>)

Adding -profile extendedDesktop to launch command or the following line to application descriptor XML file (application.xml)

<supportedProfiles>extendedDesktop</supportedProfiles>

为我修复了这个错误.

这篇关于Adobe Native Extensions——不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆