使用 Heyzap 中介集成第三方 SDK 时出现问题。我创建了一个示例项目来添加Heyzap SDK并对其进行测试。Iw 工作正常,但是当我尝试添加任何第三方 SDK 时,我遇到了 Gradle 错误。
我正在使用 Unity 2018.3.11
CommandInvokationFailure: Gradle build failed.
/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/MacOS/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-4.6.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
D8: Program type already present: android.support.v4.app.INotificationSideChannel
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForRelease'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archive
您是否尝试过使用"Play Services Resolver for Unity"?