我一直在使用Adobe for Air 3.0在Android上的本机扩展的振动示例。
我已经编译了ANE并打包了.apk。
我遇到的问题是ActionScript库的ExtensionContext为空。
我尝试使用adt -package -target apk-debug创建.apk,这样我就可以看到logcat中的动作脚本跟踪,这就是我发现空错误的地方。
extContext = ExtensionContext.createExtensionContext("com.adobe.Vibration", null);extContext为空,并且在下面的.call()方法上崩溃。
所有的源代码都是从示例中获得的,我没有做任何修改。
有没有人有在windows机器上运行Adobe的ANE示例的经验?大多数示例都是针对Mac的。
发布于 2011-11-12 05:23:01
上帝啊。浪费了一周的时间。
我使用的是来自gotoandlearn.com的教程,该教程告诉我,在构建脚本中,使用jar命令将我的本机扩展放入jar。
我只需使用在NativeAndroid/bin/文件夹中自动构建的.jar,一切都很好。
事实证明,该教程已经过时,不再对构建真正有用。
发布于 2013-08-02 19:00:39
另有一条评论。你需要设置目标平台和复选框Is Library from Properties -> Android才能将jar编译到bin文件夹中。
来自gotoandlearn的P.S. .sh可以在Windows的Powershell中执行,只需稍加修改即可运行bat文件:( cmd "/c adt.bat“)
发布于 2013-10-07 23:30:31
在我正在编写的一个Native扩展上,我遇到了完全相同的问题,并且已经开源。我从Adobe DevNet的教程代码开始这个项目。我已经找到了这个特定问题的例子,我试图准确地跟踪它,但还没有成功。我已经确定它是一个沙盒允许域问题。
下面是我的代码行:
_aneContext = ExtensionContext.createExtensionContext("com.adobe.sampleasextension", "");下面是我的GitHub项目中代码的链接:
下面是我的编译器错误:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
at com.adobe.sampleasextension::SampleASExtension()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/ANESampleSWC/src/com/adobe/sampleasextension/SampleASExtension.as:14]
at ANESampleTest/initializeANE()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/TEST_AndroidAIR/src/ANESampleTest.as:198]
at ANESampleTest/onAddedToStage()[/Users/stevewarren/Clients/Speakaboos/git_repositories/ANESampleProject/TEST_AndroidAIR/src/ANESampleTest.as:131]
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at AppEntryCommon/run()
at global/runtime::AndroidMobileDeviceAppEntry()https://stackoverflow.com/questions/8031761
复制相似问题