I recently faced an issue when attempting to clone and run a project. The error message suggested upgrading the Gradle to a more recent version. I am aware that such an upgrade could potentially introduce changes in the codebase and create conflicts.
After some investigation, I found that using an earlier version of Java for Gradle might resolve the problem. Upgrading Gradle versions can indeed lead to codebase changes and potential conflicts.
Solution for Gradle Version Issue:
If you encounter a similar situation, you can try the following steps:
Open Android Studio.
Navigate to “Settings” from “File” > " Settings" (depending on your Android Studio version).
Go to “Build, Execution, Deployment” > “Build Tools” > “Gradle.”
Here, you can select an earlier version of Java (e.g., Coretto 8).
Apply the changes.
This solution worked for me, and hope would help others also .