Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Question FAILURE: Build completed with 2 failures.

Discussion in 'Android' started by andrew210, Feb 17, 2023.

  1. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hello! I've been stuck with this issue for a few days now and tried a number of things to try and fix it but getting nowhere right now:

    Code (csharp):
    1.  
    2. FAILURE: Build completed with 2 failures.
    3.  
    4. 1: Task failed with an exception.
    5. -----------
    6. * Where:
    7. Build file 'C:\Users\Andrew\Documents\GitHub\ha2023\Library\Bee\Android\Prj\IL2CPP\Gradle\unityLibrary\build.gradle' line: 55
    8.  
    9. * What went wrong:
    10. A problem occurred evaluating project ':unityLibrary'.
    11. > Could not find method ndkPath() for arguments [] on extension 'android' of type com.android.build.gradle.LibraryExtension.
    12.  
    13. * Try:
    14. 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.
    15. ==============================================================================
    16.  
    17. 2: Task failed with an exception.
    18. -----------
    19. * What went wrong:
    20. A problem occurred configuring project ':unityLibrary'.
    21. > compileSdkVersion is not specified. Please add it to build.gradle
    22.  

    What I've tried so far:

    • Delete Google Play Games plugin
    • Delete all firebase plugins
    • Use Unity 2022.2.7f1 (instead of Unity 2022.1.X)
    • Delete the library folder
    • Set minimum api level to 29

    I'm now a little out of ideas and not sure where to turn, if anyone has any suggestions about whats going on here, I'd love some help. Thank you
     
  2. legounderpants

    legounderpants

    Joined:
    Jan 30, 2023
    Posts:
    1
    Hi, did you manage to fix it... I am stugling with a very similar problem. I really hope you have had some breakthrough
     
  3. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    I'm afraid not, still struggling with this one! I'll post if I find anything though, good luck!
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,678
    Most likely you have outdated gradle templates set in PlayerSettings, you might need to regenerate them.