如何在flash中为ios添加google admob广告?

时间:2014-08-29 03:22:51

标签: android ios flash air admob

我尝试在我的flash for ios应用程序中添加admob广告。我已经安装了admob ane(https://code.google.com/p/flash-air-admob-ane-for-ios-and-android/)在时间轴中添加以下代码

import so.cuo.platform.admob.Admob; 
import so.cuo.platform.admob.AdmobEvent; 
import so.cuo.platform.admob.AdmobSize; 
var admob:Admob=Admob.getInstance(); 
admob.setKeys("ca-app-pub-17380930385764784/6322941144","ca-app-pub-17380930385764874/4846207943"); 
admob.showBanner(Admob.BANNER,AdmobPosition.BOTTOM_CENTER);

和test-app.xml的内容

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/14.0">
    <id>test</id>
    <filename>test</filename>
    <name>test</name>
    <versionNumber>1.0.0</versionNumber>
    <initialWindow>
        <content>test.swf</content>
    <autoOrients>false</autoOrients>
        <fullScreen>false</fullScreen>
        <visible>false</visible>
    </initialWindow>
<android>
        <manifestAdditions><![CDATA[
            <manifest android:installLocation="auto">

                <uses-permission android:name="android.permission.INTERNET"/>

                <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
                <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
                 <application>
                <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
                        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
                </application>
            </manifest>

        ]]></manifestAdditions>
    </android>
    <iPhone>
        <InfoAdditions><![CDATA[
            <key>UIDeviceFamily</key>
            <array>
                <string>1</string>
                <string>2</string>
            </array>
        ]]></InfoAdditions>
        <requestedDisplayResolution>high</requestedDisplayResolution>
    </iPhone>
</application>

但在我跑步时出错。

invalid application descriptor unknown namespace http //ns.adobe.com/air/application/14.0

我不知道这是什么步骤。

1 个答案:

答案 0 :(得分:0)

AIR SDK版本太低。将adobe flash AIR SDK升级到14或更高版本。