FIXED: MainTemplate.gradle not found! FileNotFoundException Error Unity 2021.3.6f1

11,560
0
Published 2022-07-21
Unity 2021.3.6f1 and other Unity versions get the error when building to Android Devices:
"FileNotFoundException: Failed to find $C:/Program Files/Unity/Hub/Editor/2021.3.6f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\GradleTemplates\mainTemplate.gradle"

In this video, I will show you how to fix this issue to build to your Android.

Original tools folder:
C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\cmdline-tools\2.1

New tools folder:
C:\Program Files\Unity\Hub\Editor\2021.3.6f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools


Join our Discord: discord.gg/rAYumVP


~~Thanks for Watching!~~

Support me on Patreon:
www.patreon.com/TechDunk


-Subscribe for more!-

My social media:
Discord - discord.gg/rAYumVP
Itch.io - devdunk.itch.io/
Instagram - instagram.com/DevDunkStudio
Twitter - twitter.com/DevDunkStudio
Facebook - facebook.com/DevDunkStudio

#unity3d

All Comments (21)
  • @DevDunkStudio
    Update: If you use the latest Unity Hub and latest Unity LTS version it should 'just work' (and there are some nice performance improvements for android as well)
  • @gueziobr
    I was looking for it just now, and you released a video about it... AWESOME. Thank you a lot.
  • Wait what? I was thinking this was an old problem (I've had this version for weeks now and no newer versions) so I thought this was an old video! But literally I was just now trying to upgrade to this version and ran into this issue. And low and behold, you just posted the answer? Thank you!!!
  • @DarkoBilandzic
    I spent last 48 housr looking for solution...It solved the problem. THANK YOU!
  • @keremozderya
    thank you bro I've been trying to solve this error for 3 days
  • @jeromeisntdev
    Appreciate you posting this video, I'm sure it helped many people like me. Though, do you think this is a failure on Unity's part not to check such errors or do you just think it's coincidental for some systems?
  • @mouradeid5457
    I truly can't thank you enough, I was losing my mind. Subscribed <3
  • @SerSunshine
    You just saved my app. I was getting really frustrated at unity. Thank you so much my dude
  • @Coouge
    My 2.1 folder doesn't have those files. Just bin, lib, notice, source.
  • @FF......
    Thank you so much. I found this video totaly easy by copy and paste the error message and it works at the first time.
  • @UknongTV
    오옹! 나이스! unable to list keys in the keystore 문제 이걸로 해결했어요 Thank you!!!!
  • thanks so much for this video!!, At this moment I'm facing this problem and it is resolved now, you saved me alot of time thank you!