一般是库重复的问题,具体根据提示查看是什么库重复
报错信息:
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.google.unity.ump.UnityConsentForm found in modules jetified-googlemobileads-unity-runtime (:googlemobileads-unity:) and jetified-ump-release-runtime (:ump-release:)
Duplicate class com.google.unity.ump.UnityConsentFormCallback found in modules jetified-googlemobileads-unity-runtime (:googlemobileads-unity:) and jetified-ump-release-runtime (:ump-release:)
Go to the documentation to learn how to Fix dependency resolution errors.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
报错显示问题在com.google.unity.ump上。
因为项目里面接入了max广告,而且导入了GoogleMobileAds文件,里面的Assets/Plugins/Android/googlemobileads-unity.aar包含了com.google.unity.ump。
而Google UMP Unity插件里面(Assets/GoogleUmp/Plugins/Android/ump-release.aar)也包含了com.google.unity.ump。
导致重复

因为新版的max广告的GoogleMobileAds包含了ump,所以我把GoogleUmp删掉了。
这是我的情况,提供做为参考
2250

被折叠的 条评论
为什么被折叠?



