Question Details

Unanswered
LineSDK for Unity is Built with a lot of error !

Hi I followed the document and build my game app in Unity but got a lot of error during compile. How can I resolve the "android.support.customtabs" duplicate from your SDK? Can you help?

Error message as following:

CommandInvokationFailure: Gradle build failed. C:/Program Files/Unity/Hub/Editor/2019.1.1f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/Windows\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.1.1f1\Editor\Data\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.customtabs.CustomTabsClient$2$2

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':transformDexArchiveWithExternalLibsDexMergerForRelease'.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\0.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\1.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\2.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\3.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\4.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\5.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\6.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\7.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\12.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\13.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\14.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\15.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\16.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\17.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\18.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\19.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\20.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\21.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\22.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\23.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\24.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\25.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\26.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\27.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\28.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\29.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\30.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\31.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\32.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\33.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\34.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\35.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\36.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\37.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\38.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\39.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\40.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\41.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\42.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\43.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\44.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\45.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\46.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\47.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\48.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\49.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\50.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\51.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\52.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\53.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\54.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\55.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\56.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\57.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\58.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\59.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\60.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\61.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\62.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\63.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\64.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\65.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\66.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\67.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\68.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\69.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\70.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\71.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\72.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\73.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\74.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\75.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\76.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\77.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\78.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\79.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\80.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\81.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\82.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\83.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\84.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\85.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\86.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\87.jar, C:\Users\Jemmy_Wu\Documents\Unity Projects\RallyZ\Temp\gradleOut\build\intermediates\transforms\dexBuilder\release\88.jar Program type already present: android.support.customtabs.CustomTabsClient$2$2 Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.

  • 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.

  • Get more help at https://help.gradle.org

BUILD FAILED in 44s ] stdout[ :checkReleaseClasspath :preBuild UP-TO-DATE :GoogleMobileAdsPlugin:preBuild UP-TO-DATE :GoogleMobileAdsPlugin:preReleaseBuild UP-TO-DATE :GoogleMobileAdsPlugin:checkReleaseManifest :GoogleMobileAdsPlugin:processReleaseManifest :preReleaseBuild :GoogleMobileAdsPlugin:compileReleaseAidl NO-SOURCE :compileReleaseAidl NO-SOURCE :GoogleMobileAdsPlugin:packageReleaseRenderscript NO-SOURCE :compileReleaseRenderscript :checkReleaseManifest :generateReleaseBuildConfig :prepareLintJar :mainApkListPersistenceRelease :generateReleaseResValues :generateReleaseResources :GoogleMobileAdsPlugin:compileReleaseRenderscript :GoogleMobileAdsPlugin:generateReleaseResValues :GoogleMobileAdsPlugin:generateReleaseResources :GoogleMobileAdsPlugin:packageReleaseResources :mergeReleaseResources :createReleaseCompatibleScreenManifests :processReleaseManifest :splitsDiscoveryTaskRelease :GoogleMobileAdsPlugin:generateReleaseRFile :processReleaseResources :generateReleaseSources :GoogleMobileAdsPlugin:generateReleaseBuildConfig :GoogleMobileAdsPlugin:prepareLintJar :GoogleMobileAdsPlugin:generateReleaseSources :GoogleMobileAdsPlugin:javaPreCompileRelease :GoogleMobileAdsPlugin:compileReleaseJavaWithJavac :GoogleMobileAdsPlugin:processReleaseJavaRes NO-SOURCE :GoogleMobileAdsPlugin:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease :javaPreCompileRelease :compileReleaseJavaWithJavac :compileReleaseNdk NO-SOURCE :compileReleaseSources :lintVitalRelease :mergeReleaseShaders :compileReleaseShaders :generateReleaseAssets :GoogleMobileAdsPlugin:mergeReleaseShaders :GoogleMobileAdsPlugin:compileReleaseShaders :GoogleMobileAdsPlugin:generateReleaseAssets :GoogleMobileAdsPlugin:packageReleaseAssets :mergeReleaseAssets :transformClassesWithDexBuilderForRelease :transformDexArchiveWithExternalLibsDexMergerForRelease FAILED 35 actionable tasks: 35 executed ] exit code: 1 UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action1[T] progress, System.String error) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0) Rethrow as GradleInvokationException: Gradle build failed UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0) Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown. UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <177bc8179be6497489c4b5b319f290d7>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup target<message truncated>

0
Profile picture
Jemmy Wu

Answers

0
Are you sure? question.vm