I am new to Android Studio, but when I try to create a new project. Gradle version 6.7.1 is installed well, but the Gradle plugin 4.2.0 is not, This error popup. I tried many things even VPN, turn off antivirus, and firewall. but I couldn’t solve this problem. I post the error below. Thanks.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'My Application'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.2.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.2.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.0/gradle-4.2.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.0/gradle-4.2.0.pom'.
> Connection reset
... 243 more
Caused by: java.net.SocketException: Connection reset
... 258 more
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 42s