Note that my Android Studio version is 3.5.2. This method is only for reference if the versions are different.
When importing old projects, gradle synchronization fails due to version problems. The following records the places where gradle needs to be changed when importing projects.
Note that the following figures are specific to be unified with your own AS version. You can create a new project and look at the same files in the new project. What are the numbers to be changed?
After changing this place in gradle, click the little elephant icon in the upper right corner of the IDE to re-synchronize, and the old project can run successfully.