将 Adobe AIR 应用程序部署到 iOS 模拟器
Posted
技术标签:
【中文标题】将 Adobe AIR 应用程序部署到 iOS 模拟器【英文标题】:Deploy Adobe AIR app in to iOS simulator 【发布时间】:2015-08-07 21:43:36 【问题描述】:我正在尝试在 ios 模拟器上运行一个简单的测试应用,但出现此错误:
Error occurred while packaging the application:
[Fatal Error] :1:1: Content is not allowed in prolog.
java.io.IOException: PLIST generation failed due to SAX error:org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.adobe.air.Plist.newFromString(Plist.java:351)
at com.adobe.air.Plist.newFromFile(Plist.java:325)
at com.adobe.air.ipa.IPAOutputStream.setSDKVersion(IPAOutputStream.java:1070)
at com.adobe.air.ipa.IPAOutputStream.setPlatformSDKLocation(IPAOutputStream.java:971)
at com.adobe.air.ipa.IPAPackager.setDeviceSDKDirectory(IPAPackager.java:187)
at com.adobe.air.ADT.parseFileAndPathArguments(ADT.java:1423)
at com.adobe.air.ADT.parseDescriptorAndFileset(ADT.java:1474)
at com.adobe.air.ADT.parseInput(ADT.java:929)
at com.adobe.air.ADT.parsePackage(ADT.java:672)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:570)
at com.adobe.air.ADT.run(ADT.java:419)
at com.adobe.air.ADT.main(ADT.java:469)
Exception in thread "main" java.lang.Error: Unable to find llvm JNI lib in:
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar/Darwin
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/aot/lib/x64
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib/adt.jar
/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/lib
at adobe.abc.LLVMEmitter.loadJNI(LLVMEmitter.java:582)
at adobe.abc.LLVMEmitter.<clinit>(LLVMEmitter.java:596)
at com.adobe.air.ipa.AOTCompiler.generateExtensionsGlue(AOTCompiler.java:419)
at com.adobe.air.ipa.AOTCompiler.generateMachineBinaries(AOTCompiler.java:1790)
at com.adobe.air.ipa.IPAOutputStream.createIosBinary(IPAOutputStream.java:378)
at com.adobe.air.ipa.IPAOutputStream.finalizeSig(IPAOutputStream.java:743)
at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:91)
at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:245)
at com.adobe.air.ADT.parseArgsAndGo(ADT.java:571)
at com.adobe.air.ADT.run(ADT.java:419)
at com.adobe.air.ADT.main(ADT.java:469)
我用谷歌搜索了它,但我无法修复它。
重现步骤:
-
创建一个 ActionScriptMobileProject
将其配置为在 iOS 模拟器上运行
在不更改代码的情况下运行它。
【问题讨论】:
【参考方案1】:要解决这个问题,我们需要更新 AIR SDK
https://helpx.adobe.com/air/kb/archived-air-sdk-version.html
复制到这里:
Mac OS X:/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK
Windows 7(64 位):C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\eclipse\plugins\com.adobe.flash.compiler_4.7.0.349722\AIRSDK
并将 *-app.xml 文件头更新为这个:
<application xmlns="http://ns.adobe.com/air/application/17.0">
见http://www.adobe.com/devnet/air/articles/ane-android-devices.html
【讨论】:
以上是关于将 Adobe AIR 应用程序部署到 iOS 模拟器的主要内容,如果未能解决你的问题,请参考以下文章
在 Android/iOS 中使用 Adobe AIR 播放 AAC 流
将参数从 Java 活动传递到 Adobe AIR 应用程序