Error message :
Project is using an old version of the Android Gradle plug-in. The minimum supported version is x.x.x Please update the version of the dependency 'com.android.tools.build:gradle'
1) In Android Studio, select File ---> Settings ---> Gradle ---> Project-level settings ---> select "Use default Gradle wrapper (recommended)" ---> Apply ---> OK.
2) Visit the link below for choosing the correct Android Gradle Plugin Version and Gradle Version accordingly and update the same in File ---> Project Structure.
https://developer.android.com/studio/releases/gradle-plugin.html#revisions
4) File ---> Sync Project with Gradle Files. This will download the required files and fix the error.