If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle. This problem may be caused by a discrepancy between the Gradle plugin and gradle version, or a discrepancy between the project IDE version and the original version

Gradle plugin version Gradle version
1.0.0-1.1.3 2.2.1-2.3 –
1.2.0-1.3.1 2.2.1-2.9 –
1.5.0 2.2.1-2.13 –
2.0.0-2.1.2 2.10-2.13
2.1.3-2.2.3 2.14.1 +
2.3.0 + 3.3 +
3.0.0 + 4.1 +
3.1.0 + 4.4 +
3.2.0-3.2.1 4.6 +
3.3.0-3.3.2 rainfall distribution on 10-12 4.10.1 +
3.4.0 3.4.1 track – 5.1.1 +
3.5.0-3.5.3 5.4.1 +
3.6.0 + 5.6.4 +
4.0.0 + 6.1.1 +
4.1.0 + 6.5 +
4.2.0 + 6.7.1 +

There is also a problem with Gradle download failure, which can happen very easily with new projects, or with a newly installed Android Studio, Gradle download failure, which can cause compilation failure. Gradle is not downloaded locally or the corresponding gradle version in the project fails to be downloaded. You can download it and place it in the corresponding path of the. Gradle folder. Alternatively, you can click on the update in the lower right corner of Android Studio and say that the Android Gradle Plugin is ready to update. After the update, the plugin version and Gradle version will automatically match, and the update will also solve the above problems.