I have upgraded my Android Studio and after that I’m facing this error:
Gradle sync failed: Plugin [id: 'com.android.application', version: '7.1.2', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.2')
Searched in the following repositories:
Gradle Central Plugin Repository
Google
MavenRepo (24 s 586 ms)
I have upgraded JDK to 11 but it didn’t fix the error. What else can I do?
6
Answers
Solved:
After trying some other solutions I figured out that I didn't delete proxies in
gradle-wrapper.properties
. That was preventing my project from downloading dependencies.go tp setting -> then Plugins -> in plugins -> then click on three dot -> then Enable all downloaded plugins
Try this it will definitely work.
enter image description here
I faced the same problem when I intentionally updated to gradle 7.1.3 today, I just restarted the android studio and changed the gradle version to 7.1.2 and it worked.
That happen with the newer gradle versions, Go to Settings -> Plugins -> settings -> HTTP proxy settings then switch it to (auto detect proxy settings) then save and sync the project, that will solve the problem.
Check the images below for quick help
https://i.stack.imgur.com/BSCHA.jpg
https://i.stack.imgur.com/g4CEO.png
Disconnect the VPN, close and then open Android Studio
If you are in Iran or the Netherlands, be sure to use the American or British VPN
First update the AndroidStudio, SDK and Plugins to latest.
then In Gradle.properties(Global properties) disable/Comment the below mentioned code.
build.gradle
finally sync project with gradle files. Issue will be fixed.