0
\$\begingroup\$

I have added leaderboard to my unity game for which I have used the google play services plugin. But when I try to build, this is the error I get:

 Execution failed for task 'processReleaseManifest'.
> Manifest merger failed : Attribute meta-data#com.google.android.gms.games.APP_ID@value value= 
(\728999946156) from [:unityLibrary:GameServicesManifest.plugin] AndroidManifest.xml:10:13-42 
is also present at [:unityLibrary:GooglePlayGamesManifest.plugin] AndroidManifest.xml:20:13-46 value= 
(\u003728999946156).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:8:9- 
10:45 to override.

Here's what's in the first manifest file:

<?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="14" />
<application>
    <!-- The space in these forces it to be interpreted as a string vs. int -->
    <meta-data android:name="com.google.android.gms.games.APP_ID"
        android:value="\u003728999946156" />        
    <!-- Keep track of which plugin is being used -->
    <meta-data android:name="com.google.android.gms.games.unityVersion"
        android:value="\u0020.20.20" />
    <activity android:name="com.google.games.bridge.NativeBridgeActivity"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>

and the second file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android = "http://schemas.android.com/apk/res/android"
package="com.google.example.games.mainlibproj">
<application>
<meta-data android:name="com.google.android.gms.games.APP_ID" android:value = "\728999946156" />
<activity android:name="com.google.games.bridge.NativeBridgeActivity" android:theme = 
"@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
</manifest>
\$\endgroup\$
5
  • 1
    \$\begingroup\$ Presumably you tried following the suggestion in the error message: Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:8:9- 10:45 to override. - what happened when you tried that? \$\endgroup\$ Commented Oct 18, 2020 at 16:39
  • \$\begingroup\$ @DMGregory , yes, I have done that now and this is the error that's showing up: D8: Program type already present: com.google.example.games.mainlibproj.BuildConfig \$\endgroup\$ Commented Oct 18, 2020 at 17:24
  • \$\begingroup\$ Looks like that should be in your question then. \$\endgroup\$ Commented Oct 18, 2020 at 17:38
  • \$\begingroup\$ @DMGregory , I just restarted unity now and the problem is not there anymore. Not sure why that happened. Thanks for your help..... \$\endgroup\$ Commented Oct 18, 2020 at 17:51
  • \$\begingroup\$ If you've solved your problem, please post your solution as an Answer below. \$\endgroup\$ Commented Oct 18, 2020 at 17:51

1 Answer 1

1
\$\begingroup\$

I restarted my unity project and the problem no longer exists. I'm not sure how it got resolved....

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.