Closed ugur2372 closed 10 years ago
Can you upload your AndroidManifest.xml?
My guess is that you are not adding the tag meta-data
as a child of the UnityPlayerNativeActivity activity
tag.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<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">
<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"/>
Replace the UnityPlayerProxyActivity
activity with the following:
<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>
</activity>
<activity android:name="com.unity3d.player.UnityPlayerActivity" 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">
</activity>
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" 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">
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
I tried but gives me this error when building:
Error building Player: CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:\Program Files (x86)\Java\jdk1.8.0\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Error: [Temp\StagingArea\AndroidManifest-main.xml:4, C:\Users\UĞUR\Documents\DefendTheCore\Temp\StagingArea\android-libraries\MainLibProj\AndroidManifest.xml:23] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.player.UnityPlayerNativeActivity] element:
<activity
-- @android:name="com.unity3d.player.UnityPlayerNativeActivity">
--
]
That's weird are you on the latest Unity3D version? I would also try to remove the Temp folder on your unity project root directory.
Yes, i updated the Unity3d to 4.3.4 but still the same error. I used this https://github.com/playgameservices/play-games-plugin-for-unity plugin too. It may be related?
The other plugin shouldn't affect (the point of this plugin to work with the google play services).
Have you tried removing or renaming the Temp folder on your project root directory? Close Unity before doing that (just in case).
Yes, i have tried remove the Temp folder on my project root directory. But still gives me the same error when building:
Error building Player: CommandInvokationFailure: Unable to merge android manifests. See the Console for more details. C:\Program Files (x86)\Java\jdk1.8.0\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:/Program Files (x86)/Unity/Editor/Data/BuildTargetTools/AndroidPlayer\sdktools.jar" -
stderr[
Error: [Temp\StagingArea\AndroidManifest-main.xml:4, C:\Users\UĞUR\Documents\DefendTheCore\Temp\StagingArea\android-libraries\MainLibProj\AndroidManifest.xml:23] Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.player.UnityPlayerNativeActivity] element:
<activity
-- @android:label="@string/app_name"
-- @android:name="com.unity3d.player.UnityPlayerNativeActivity">
--
]
Could you please make a video tutorial for this? I am not actually getting how to use the plugin. I am stuck because of this.
Doesn't the manifest merging issue come up when the min sdk values are not the same in different manifest files? Just make sure they are all 8 (or 9).
The manifest merging issue doesn't come up. I set all manifest files min sdk version is 9. But still doesn't clickable. Thanks anyway.
I'm closing this issue since it seems that it's a user specific problem.
Hello,
Firstly, thank you for this plugin. I got the plugin. I added into my unity game but i have a problem. The ads shows up without a problem. The interstitial ad is clickable but i can't click to the banner. I have tried this
http://forum.unity3d.com/threads/195169-Google-Admob-plugin-for-Unity-ad-is-not-clickable
but nothing's changed.
You told about UnityPlayerNativeActivity in Readme. There isn't any activity block in my manifest like this. I have tried to add something like this:
But when i add this in manifest file, it gets compile error like this:
Error building Player: CommandInvokationFailure: Unable to merge android manifests. Trying to merge incompatible /manifest/application/activity[@name=com.unity3d.player.UnityPlayerNativeActivity] element:
Could you give me an advice or simple example how i can solve this. I'm a newbie and sorry for bad English.
Thanks..