我收到此错误:使用Google Play游戏服务需要在com.awsum.dunnn的清单的应用标记中使用名称为“com.google.android.gms.games.APP_ID”的元数据标记
现在在我的androidmanifest文件中,包的名称是由自动生成的Google Play游戏设置:com.google.example.games.mainlibproj
我尝试将其更改为我的包,但仍然是同样的错误。我觉得某个地方的包裹名称可能已关闭,但我不知道在哪里。我仍然试图找到安装程序从哪里获取包名称的信息,所以我可以修复它。
编辑:
这是清单:
<?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.awesome.dunnn"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
<application>
<!-- Required for Nearby Connections API -->
<meta-data
android:name="com.google.android.gms.nearby.connection.SERVICE_ID"
android:value="" />
<!-- 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="\ 107********1" />
<!-- Keep track of which plugin is being used -->
<meta-data android:name="com.google.android.gms.games.unityVersion"
android:value="\ 0.9.41" />
<!-- Build time check to make sure play-services libraries are present -
->
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
答案 0 :(得分:1)
在此SO post answer中,遇到了同样的错误。用户所做的是在AndroidManifest.xml
标记下的<application>
添加以下代码段:
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
游戏服务标签中提供了 APP_ID
,请参见下面的屏幕截图。
答案 1 :(得分:1)
在不同论坛发帖后,每个人都忽略或给出与上面相同的答案(在Unity中无法完成,因为在任何地方都没有 string.xml 文件在资产中,我终于解决了它。
问题是,当合并清单时,我的Google Play清单完全被忽略了。所以我不得不覆盖Unity中的清单。
我稍后会编辑此答案,因此会更清晰,但现在请参阅this链接覆盖清单。