升级Unity 2020.03至2022.03时因Google Play Games重复项导致构建失败求助
Unity 2022升级后GPGS版本冲突构建错误解决步骤
- 找到项目里的GPGS插件Manifest文件:路径为
Assets/Plugins/Android/GooglePlayGamesManifest.plugin/AndroidManifest.xml - 打开该文件,先在根节点
<manifest>中添加tools命名空间:
将原<manifest>标签开头修改为:<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.google.games.unity"> - 找到对应
com.google.android.gms.games.unityVersion的meta-data标签,为其添加tools:replace="android:value"属性,修改后代码如下:<meta-data android:name="com.google.android.gms.games.unityVersion" android:value="0.10.12" tools:replace="android:value" /> - 保存文件,重新尝试构建Android项目
如果上述操作后仍报错,可先备份项目,删除Library文件夹,重新导入GPGS 0.10.12插件,再重复上述步骤。
内容的提问来源于stack exchange,提问作者Victor Moldoveanu
相关产品推荐
相关产品推荐

