After days of trying to find out, the reason for all this chaos is because some of the libraries that I was using in the project are no longer available or supported in jitpack or maven. So I had to check if removing them had any impacts. I was able to permanently remove some libraries while I had to find the jar / aar files for others and put them into my project. Then I was able to build and run successfully.