我正在使用Unity开发Android游戏。我为Admob使用了this插件。插页式广告是可点击的,但是当我点击横幅广告时,不会发生任何事情。我试过了this,但没有改变。此外,我尝试在清单文件中添加com.unity3d.player.UnityPlayerNativeActivity
活动,我收到此错误:
尝试合并不兼容 /manifest/application/activity[@name=com.unity3d.player.UnityPlayerNativeActivity] 元素:
我该如何解决这个问题?任何建议都会让我开心。感谢。
这是我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<!-- This file was automatically generated by the Google Play Games plugin for Unity
Do not edit. -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
<application>
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="\ 123456789123" />
<meta-data android:name="com.google.android.gms.appstate.APP_ID"
android:value="\ 123456789123" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name="com.google.example.games.pluginsupport.SignInHelperActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.example.games.pluginsupport.SelectOpponentsHelperActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.example.games.pluginsupport.InvitationInboxHelperActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity android:name ="com.unity3d.player.UnityPlayerProxyActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:screenOrientation="landscape">
<intent-filter>
<action android:name ="android.intent.action.MAIN" />
<category android:name ="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name ="unityplayer.ForwardNativeEventsToDalvik" android:value ="true" />
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
答案 0 :(得分:1)
统一检查最小sdk版本。你已经声明它8并且在google play服务中默认min sdk是9.尝试将你的sdk更改为9并且希望它能够正常工作。