Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Gradle build failed

Discussion in 'Android' started by OctoSharko, May 19, 2024.

  1. OctoSharko

    OctoSharko

    Joined:
    Dec 9, 2016
    Posts:
    43
    Hi,

    I've integrated IronSource/LevelPlay (real pain btw) and resolved the dependencies.
    My application runs fine in the Editor but the Android build fails :

    stderr[
    Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':unityLibrary:mergeReleaseJavaResource'.
    > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
    > 4 files found with path 'commonMain/default/manifest' from inputs:
    - C:\Development\FalloutSurvival\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\co.touchlab.stately-concurrency-2.0.5.jar
    - C:\Development\FalloutSurvival\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\co.touchlab.stately-strict-2.0.5.jar
    - C:\Development\FalloutSurvival\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\io.insert-koin.koin-annotations-1.3.0.jar
    - C:\Development\FalloutSurvival\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\libs\io.insert-koin.koin-core-3.5.3.jar
    Adding a packagingOptions block may help, please refer to
    https://google.github.io/android-gr...ild.gradle.internal.dsl.PackagingOptions.html
    for more information

    * 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

    I don't know where to start to fixing this problem, can you please advise ?

    Thanks
     
  2. OctoSharko

    OctoSharko

    Joined:
    Dec 9, 2016
    Posts:
    43
    I deleted the problematic jars and it did the trick. I have no idea where they came from