Adobe Native Extensions — not working?

我的未来我决定 提交于 2020-01-01 15:36:15

问题


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)

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

  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" -target ane "TestSampleANE.ane" "bin\extension.xml" -swc "bin\SampleAne.swc" -tsa none -platform Windows-x86 -C "bin"

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

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.


回答1:


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

<supportedProfiles>extendedDesktop</supportedProfiles>

fixed this error for me.




回答2:


Go to Project/Properties/Flex Build Packaging tab, then click Native Extensions tab and checked the Package box that is been in your native extension's line. This worked for me.




回答3:


(For some reason I can't add a comment to ask you, but) Are you running Flash Builder on 32 bit or 64 bit? I think adl won't support 64 bit



来源:https://stackoverflow.com/questions/7868380/adobe-native-extensions-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!