Air Native Extension无法识别默认扩展,因此使用它构建的SWF无法启动

时间:2013-10-09 14:48:05

标签: ios flex air flash-builder air-native-extension

我正在构建一个原生扩展,当我尝试从使用此原生扩展的Flex Mobile应用程序运行SWF时,即使默认包可用,也无法加载。它没有给我任何错误。我可以在模拟器中启动它,一切正常。

构建扩展时,我的目录结构如下(用ThirdParty替换我公司的名称)

build/
   ThirdParty.framework
   ThirdParty.swc
   default/
       library.swf (This is from a flex library project that is just a stub for the ANE)
   ios/
       library.swf (This is from a flex library project that connects with libThirdParty.a)
       libThirdParty.a
       ThirdParty.bundle
       platformoptions.xml

这是我为构建它而运行的命令:

adt -package -target ane ThirdParty.ane extension.xml -swc ThirdParty.swc -platform iPhone-ARM -platformoptions ios/platformoptions.xml ./ThirdParty.framework -C ios . -platform iPhone-x86 -platformoptions ios/platformoptions.xml ./ThirdParty.framework -C ios . -platform default -C default .

这是我的extension.xml

<extension xmlns="http://ns.adobe.com/air/extension/3.8"> 
    <id>com.thirdparty.sdk</id> 
    <versionNumber>0.0.1</versionNumber> 
    <platforms>
        <platform name="iPhone-ARM"> 
            <applicationDeployment> 
                <nativeLibrary>libThirdPartyAirSDK.a</nativeLibrary> 
                <initializer>ThirdPartyExtensionInitializer</initializer>
                <finalizer>ThirdPartyExtensionFinalizer</finalizer>
            </applicationDeployment>
        </platform>
        <platform name="iPhone-x86"> 
            <applicationDeployment> 
                <nativeLibrary>libThirdPartyAirSDK.a</nativeLibrary> 
                <initializer>ThirdPartyExtensionInitializer</initializer>
                <finalizer>ThirdPartyExtensionFinalizer</finalizer>
            </applicationDeployment>
        </platform>
        <platform name="default">
            <applicationDeployment/>
        </platform>
    </platforms> 
</extension>

我的平台选项:

<platform xmlns="http://ns.adobe.com/air/extension/3.8"> 
    <sdkVersion>6.1</sdkVersion>
    <linkerOptions> 
            <option>-framework ThirdParty</option> 
            <option>-liconv</option> 
    </linkerOptions>
    <packagedDependencies> 
        <packagedDependency>ThirdParty.framework</packagedDependency> 
    </packagedDependencies>
</platform>

注意:

  • 我已经下载并覆盖了AirSDK 3.9,但如果我使用3.9名称空间,它会抱怨。 (即使它在我使用3.9应用程序命名空间时没有抱怨)
  • ios扩展程序运行正常,它获取默认扩展程序运行
  • 如果我在AIR设备模拟器中运行一个项目,我会收到以下错误

错误:

Process terminated without establishing connection to debugger.

Not supported native extensions profile

Launch command details:  "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0/bin/adl" - runtime "/Applications/Adobe Flash Builder 4.7/sdks/4.6.0/runtimes/air/mac" -profile extendedMobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -XversionPlatform IOS -extdir "/Users/username/Documents/Adobe Flash Builder 4.7/.metadata/.plugins/com.adobe.flexbuilder.project.ui/ANEFiles/ThirdPartyGameApp/macosx/" /Users/username/src/github.com/thirdparty/ThirdPartyGameApp/bin-debug/ThirdPartyGameApp-app.xml /Users/username/src/github.com/thirdparty/ThirdPartyGameApp/bin-debug 

0 个答案:

没有答案