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. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Unity 2021.3.6f Android Gradle template folder missing (build failed)

Discussion in 'Editor & General Support' started by kami1380, Jul 9, 2022.

  1. kami1380

    kami1380

    Joined:
    May 15, 2022
    Posts:
    2
    Hello

    I installed unity 2021.3.6f with android build support (NDK and SKD) using unity hub.

    Going into a project and attempting to build it on android platform , it crashes and I get this error :
    >FileNotFoundException: Failed to find $C:/ProgramFiles/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle

    I looked up in the directory and I don't even have the /Tools folder inside /AndroidPlayer.
    Tried to reinstall unity and android module again but even after 2 times of reinstallation I still receive this weird error.

    In unity Edit>Preferences>External-Tools>Gradle Installed With Unity is Ticked and marked to the /Tools folder which doesn't even exists

    (there is also a warning below that saying I'm missing the recommended Gradle and I should install the recommended version using unity hub. but I already tried reinstalling everything)

    I have used the unity android build before and it was always fine, perhaps this happens with the 2021.3.6f version that was released this week.

    Can't find any solution to this anywhere, hope you can help.
     
  2. iMobCoding

    iMobCoding

    Joined:
    Feb 13, 2017
    Posts:
    146
  3. kami1380

    kami1380

    Joined:
    May 15, 2022
    Posts:
    2
  4. foobooio

    foobooio

    Joined:
    Oct 14, 2018
    Posts:
    5
    Copying over folder as described in link worked for me too. Thanks.
     
  5. unity_2jxHNVY36zr2mg

    unity_2jxHNVY36zr2mg

    Joined:
    Jan 17, 2020
    Posts:
    81
    Unity is a joke
     
    Dr_Shtenzel likes this.
  6. therebeckles

    therebeckles

    Joined:
    Jun 30, 2022
    Posts:
    1
    it is a joke but i'm not laughing