我一直在尝试解决Unity中的错误,但根本无法让它工作。
我安装了Admob和Google Play服务,一切都很好;一旦我添加Facebook SDK,这就是我得到的错误。我尝试删除其中一个冲突,删除时没有一个冲突。有谁知道修复?
Found conflicting Android library gpgs-plugin-support
Assets/Plugins/Android/gpgs-plugin-support-0.9.42 (managed by the Android Resolver) conflicts with:
Assets/GooglePlayGames/Editor/m2repository/com/google/games/gpgs-plugin-support/0.9.42/gpgs-plugin-support-0.9.42.aar
Your application is unlikely to build in the current state.
To resolve this problem you can try one of the following:
* Updating the dependencies managed by the Android Resolver
to remove references to old libraries. Be careful to not
include conflicting versions of Google Play services.
* Contacting the plugin vendor(s) with conflicting
dependencies and asking them to update their plugin.
UnityEngine.Debug:LogWarning(Object)
Google.Logger:Log(String, LogLevel)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)
GooglePlayServices.ResolverVer1_1:FindAndResolveConflicts()
GooglePlayServices.<DoResolution>c__AnonStorey17:<>m__29()
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey18:<>m__26(List`1)
GooglePlayServices.<GradleResolution>c__AnonStorey14:<>m__1F(Result)
GooglePlayServices.<GradleResolution>c__AnonStorey15:<>m__28()
GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
答案 0 :(得分:0)
Google提供了一个名为Google Play Services Jar Resolver的工具,您应该使用它来解决这些冲突。从unitypackage文件导入时,最新的Facebook SDK (7.10.1)已包含解析程序。
导入包后,您可以在Unity Editor菜单栏中的Assets&gt;下解析客户端jar。播放服务解析器&gt; Android解析器。
如果它不适合您,您还可以从jar解析器的github page获取详细信息。
答案 1 :(得分:0)
解决方法是将Assets/GooglePlayGames/Editor/m2repository/com/google/games/gpgs-plugin-support/0.9.42/gpgs-plugin-support-0.9.42.aar
重命名为
资产/ GooglePlayGames /编辑/ m2repository / COM /谷歌/游戏/全球公共-插件支持/ 0.9.42 /全球公共-插件支持-0.9.42。的 srcaar 强>
并编辑Assets / GooglePlayGames / Editor / m2repository / com / google / games / gpgs-plugin-support / 0.9.42 / gpgs-plugin-support-0.9.42.pom并添加
<packaging>srcaar</packaging>
在<version>
行下面。
然后删除Assets/Plugins/Android/gpgs-plugin-support-0.9.42
并重新运行Jar解析器。
答案 2 :(得分:0)
尝试此解决方案!适用于最新的插件版本!
Dex问题的解决方案,有关在Unity 2018.2.0f2中添加Google Play Services 0.95和Facebook sdk 7.13.0插件
第1步:首先从此链接https://github.com/playgameservices/play-games-plugin-for-unity导入GooglePlayServices0.95插件。
第2步:在显示要导入的文件夹结构时,取消选中PlayServicesResolver文件夹。
第3步:现在从https://developers.facebook.com/docs/unity/downloads/导入Facebook SDK 7.13.0统一软件包
第4步:在这里导入facebook sdk插件的所有文件夹。
第5步:现在选择Assets / PlayServicesResolver / VersionHandler / Update
步骤6:现在选择Assets / PlayServicesResolver / AndroidResolver / Resolve
步骤7:现在选择Assets / PlayServicesResolver / AndroidResolver / Settings,然后取消选中启用自动分辨率
步骤8:现在转到项目面板,然后转到Assets / Plugins / Android /并删除除名称为“ com.google.games.gpgs-plugin-support-0.9.50”的文件夹之外的所有文件夹
步骤9:现在转到项目面板,转到Assets / Plugins / Android /并删除以下文件
com.android.support.animated-vector-drawable-25.3.1
com.android.support.customtabs-25.3.1
com.android.support.support-annotations-25.3.1
com.android.support.support-v4-25.3.1
com.android.support.support-vector-drawable-25.3.1
现在继续进行构建。它应该工作。 :)