0

Using Unity and CloudOnce,

I am implemeting cloudonce in my app withouth successfull, so I started a new project , just added the cloudonce and set up it correctly, but it crashed, After look up in the logs on logcats the error was

"Using Google Play games services requires a metadata tag with the name "com.google.android.gms.games.APP_ID" in the application tag of the manifest for com.xxx.xxx"

after further look in the manifest, I miss this

<meta-data android:name="com.google.android.gms.games.APP_ID"
        android:value="@string/app_id" />

After look in the Plugins/Android/AndroidManifest there is no meta data with the app id either

Shankar
  • 2,890
  • 3
  • 25
  • 40
D4rWiNS
  • 2,585
  • 5
  • 32
  • 54
  • Possible duplicate of [Initializing Games Client in Android](https://stackoverflow.com/questions/16595225/initializing-games-client-in-android) – Ryanas Oct 30 '17 at 11:55
  • No, This is different because in the case you mentioned , they just add the tag to the manifest MANUALLY, as I am using a plugin called cloudonce for unity and I just can't introduce this manually – D4rWiNS Oct 30 '17 at 11:57
  • Could you not override your android manifest here? https://docs.unity3d.com/Manual/android-manifest.html – Ryanas Oct 30 '17 at 12:02
  • No, since I need to add the value of @string/app_id also ( not only the meta data tag) And I am unable to access string.xml from unity to put my id, If I put it directly, the system thinks that it is an intenger and fail – D4rWiNS Oct 30 '17 at 12:05

1 Answers1

1

You can either run the Android setup from the Unity Menu or invoke it statically with the correct values. If you just want to add the app id property to the AndroidManifest.xml, you can escape it with a space to force the parser to interpret the app id as a string. This is what the plugin does when you run setup.

For example: <!-- 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="\ 1213456789" />

Clayton Wilkinson
  • 4,524
  • 1
  • 16
  • 25