I found out that unity has deprecated the internal build system and has defaulted to gradle. I've not built with the gradle build system before, and now after upgrading to unity 2019.1 full version, I can't build an android project. And, I installed the android module using unity hub, what can I do to fix this? Screenshot1 Screenshot2 Screenshot3 Screenshot4 Screenshot5 Screenshot6
If anyone has the same problem, here's how I fixed it: At first, I didn't know what to do or if I was doing the right thing but I decided to try a bunch of different things:
I had to update the JDK and SDK used by android studio, and set the path on unity instead of using the default that was installed by unity hub.
Through the SDK manager, I installed SDK build tools for all API versions from 21 to the latest, then installed all sub files on Android 5.0.1(API 21).
After that, I began to have a Daemon startup failed error and still couldn't build, then I thought that the problem couldn't be coming from the SDK, and my JDK functions correctly, so I thought of gradle files, then I downloaded full files of the latest gradle from the gradle website, unpacked it on a different folder and set the path on unity.
The effort made no difference, then I searched my PC for cached gradle files or something similar, then I found a .gradle folder on C:\Users\name\
I made a backup copy of the .gradle folder on a desktop folder, then deleted the original. Then built again, it took longer than usual, but unity successfully built the app, I built it again this time, while offline, and it was faster and built successfully.