0

There is an issue while integrating 3rd Party SDK's using Heyzap Mediation. I create a sample project to add the Heyzap SDK and test it. Iw works fine but when I tried to add any 3rd party SDK I got Gradle to error.

I'm using 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
Gonzalo Garcia
  • 6,192
  • 2
  • 29
  • 32

1 Answers1

1

Have you tried to use "Play services resolver for Unity"?

Yauheni
  • 316
  • 1
  • 7
  • I think problem is you have two similar "aar" files from different SDKs. Could you find "android.support.v4.app" in your project? If you see two files just delete one of them. It is not better solution but you can try. – Yauheni Aug 31 '19 at 10:05
  • I have checked it but there are no similar aar files. Anything else I can check? – Muhammad Ahmad Saleem Sep 03 '19 at 10:05