我非常坚持,构建 ANE 并通过示例应用程序运行它。
我已经成功构建了 ANE 并将其添加到示例项目中,但是在我得到的设备上运行它时:
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: 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)
这是我的平台选项.xml
<platform xmlns="http://ns.adobe.com/air/extension/3.1">
<sdkVersion>7.1</sdkVersion>
<linkerOptions>
<option>-ios_version_min 5.0</option>
<option>myLib.a</option>
<option>-weak_framework Twitter</option>
<option>-weak_framework MessageUI</option>
<option>-weak_framework StoreKit</option>
<option>-framework CoreTelephony</option>
</linkerOptions>
扩展名.xml
<extension xmlns="http://ns.adobe.com/air/extension/3.1">
<id>com.myCompany.air</id>
<versionNumber>0.0.1</versionNumber>
<platforms>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>myLib.a</nativeLibrary>
<initializer>myANEInitializer</initializer>
<finalizer>myANEFinalizer</finalizer>
</applicationDeployment>
</platform>
</platforms>
</extension>