Unity - Gradle build failed - Help!

PusaM

Newbie
Aug 27, 2020
44
13
Hello.
Lately i wanted to try my old Unity stuff that i learned from tutorials some years ago, compiling for PC is a piece o cake, no errors of any kind, but i wanted to try the Android compiler, and here i was flooded with an ocean of problems and errors, in the end all the Warning triangles have been fixed thanks to more that 10 hours searching non-stop on the net only today, now one error remains that i can't fix with anything found online, so far, when i compile even a new empty project, it gives this error Gradle build failed.png , what do you people think i should do to fix this error?
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
"old stuff" is a red flag. Probably outdated stuff, you forgot to put the most important part... The stuff written in the console. No one can help you with a generic error message, if not make guesses based on what you have written.
 
  • Like
Reactions: PusaM

PusaM

Newbie
Aug 27, 2020
44
13
Yep, i figured out that some screenshots will be needed, just so someone replied, here we go: Preferences.png & Errors after Compiling for Android.png .
Like i said, i newer had any problems with the PC builds, but lately i wanted to try and see how my old projects would look on Android, and there we go. What it is to say, i use an older Unity version, but i have them all old (unity, dependencies, my projects, my old PC) and don't even think on going for the latest version, for me is enough Unity 2019.3.1f1, i do not plan on taking the world with my tank game or anything, if it can be fixed ok, if not still ok.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
The issue is that Unity cannot connect to the internet, you are either using it offline, you are not signed up, or something is blocking Unity from accessing the internet.
 
  • Like
Reactions: PusaM

PusaM

Newbie
Aug 27, 2020
44
13
Yes, this must be it, i don't get much in what the Console said about those 28 errors, but some have a link to download something, unfortunately i can't connect anymore to internet with my PC to download what it needs, but i have written the link on my phone and downloaded the file, what should i do with it, or is it something else? The file reads like following "gradle-3.4.0.pom".
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
Yes, this must be it, i don't get much in what the Console said about those 28 errors, but some have a link to download something, unfortunately i can't connect anymore to internet with my PC to download what it needs, but i have written the link on my phone and downloaded the file, what should i do with it, or is it something else? The file reads like following "gradle-3.4.0.pom".
That goes beyond my knowledge unfortunately, never used Unity for phones and I am not even sure if it can be done manually.
 
  • Like
Reactions: PusaM

PusaM

Newbie
Aug 27, 2020
44
13
Me neither man, maybe someone else can help, i'll just wait. Thanks for the chat anyway, it was nice talking. :)
 
  • Like
Reactions: Winterfire

aereton

Member
Mar 9, 2018
363
691
unfortunately i can't connect anymore to internet with my PC to download what it needs,
and that's the issue right there. Gradle needs to check online repositories for build dependencies. I'm sure you could cache repositories locally on your machine and then make Gradle use these, but I don't know how feasible that is.

You'd essentially try to paint a Mona Lisa with crayons:
Bildschirm­foto 2023-10-20 um 01.58.46.png

It would be far easier and less hassle to physically haul your PC to somewhere it can access the internet. Even easier using your phone's network to connect your PC however I do understand there's the data volume problem in many places in the world.
 
  • Thinking Face
Reactions: PusaM

PusaM

Newbie
Aug 27, 2020
44
13
and that's the issue right there. Gradle needs to check online repositories for build dependencies. I'm sure you could cache repositories locally on your machine and then make Gradle use these, but I don't know how feasible that is.

You'd essentially try to paint a Mona Lisa with crayons:
View attachment 3018942

It would be far easier and less hassle to physically haul your PC to somewhere it can access the internet. Even easier using your phone's network to connect your PC however I do understand there's the data volume problem in many places in the world.
Those dependencies and repositories stuff could be all downloaded just fine at once and re used when needed, we have this days games that weight in more than 100GB, what the hell doing a download for all of them would be worth, but this jerk companies are squeezing peoples balls way too much for things to be interested anymore, drawing Mona Lisa with crayons isn't that bad, you just need to have talent, but just imagine having to draw poor Mona Lisa with crayons and need internet to do that, the crayons would be useless right? I lost my interest in Building for Android, too much effort, i wasted 30GB+ on downloading all those SDK's and re downloading them, it took ages, and then watched countless tutorials cause i didn't know what the hell is going on, wasted time and money, to hell with unity. Lately i found out that there were versions of unity that had build in Gradle systems where you could compile for android without internet, but that it old story. :)

Just in case someone wants or is able to upload some Gradle files somewhere, i would try for the last time to compile, but i bet it would need other hell knows what nonsense...
 
  • Like
Reactions: aereton

aereton

Member
Mar 9, 2018
363
691
but this jerk companies are squeezing peoples balls way too much for things to be interested anymore
Yeah I know that feel, recently tried out React Expo because I figured would be cool to port over some React web apps I've created over the years and have them available as native apps. Surprise surprise, you need to use their cloud service to compile builds, of course they want to hook you into their subscription plans (no issue with paying for licenses but this whole subscription commerce model is really starting to get on my nerves).

All those mega corps really sucked all the fun out of programming at this point. I've receded to pure open solution now and even those are on thin ice for me.
 
  • Like
Reactions: PusaM