CloudOnce 没有正确合并清单
CloudOnce not merging correctly the manifest
使用 Unity 和 CloudOnce,
我在我的应用程序中实现了 cloudonce 但没有成功,所以我开始了一个新项目,只是添加了 cloudonce 并正确设置了它,
但它崩溃了,在 logcats 上查找日志后,错误是
"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"
进一步查看清单后,我错过了这个
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
查看 Plugins/Android/AndroidManifest 后也没有包含应用程序 ID 的元数据
您可以从 Unity 菜单 运行 Android 设置或使用正确的值静态调用它。如果您只想将应用程序 ID 属性 添加到 AndroidManifest.xml,您可以使用 space 将其转义以强制解析器将应用程序 ID 解释为字符串。这是插件在您 运行 设置时所做的。
例如:
<!-- 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" />
使用 Unity 和 CloudOnce,
我在我的应用程序中实现了 cloudonce 但没有成功,所以我开始了一个新项目,只是添加了 cloudonce 并正确设置了它, 但它崩溃了,在 logcats 上查找日志后,错误是
"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"
进一步查看清单后,我错过了这个
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
查看 Plugins/Android/AndroidManifest 后也没有包含应用程序 ID 的元数据
您可以从 Unity 菜单 运行 Android 设置或使用正确的值静态调用它。如果您只想将应用程序 ID 属性 添加到 AndroidManifest.xml,您可以使用 space 将其转义以强制解析器将应用程序 ID 解释为字符串。这是插件在您 运行 设置时所做的。
例如:
<!-- 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" />