Hi All I am getting the following error
- 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.2.
Required by:
project :
Could not resolve com.android.tools.build:gradle:4.2.2.
Could not get resource ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom’.
Could not GET ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom’.
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I tried many ways such as
- Reinstalled the Android Studio many times with different versions
- Try to update the gradle but fails
- Tried to use locally downloaded gradle.
- I tried it with more than 5 different networks.
- Deleted all the system cache.
But nothing works can anyone please help me to fix this issue.