问题
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/
- created the sample DLL using cygwin to compile the C++ code (integrated the
FlashRuntimeExtensions.h
andFlashRuntimeExtensions.lib
during compilation) 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
- I created a new sample Flex Project, and included the
TestSampleAne.ane
andSampleAne.swc
in the lib files of the project. I was able to successfully access theSampleAne
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