Plugin [id: 'com.android.application', version: '8.2.0', apply: false] was not found in any of the following sources:

182 Views Asked by At

I was on flamingo then i faced this error then i updated android studio to headgehog but still facing same error. I have tried almost every solution on internet but nothing worked for me.

whenever i create new project I'm getting this error.

configuration i have:

  • latest java jdk
  • gradle 8.1
  • AGP version 8.2.0

getting this popup again and again

enter image description here

error i got while sync:

Build file 'C:\Users\Mohit Dhote\AndroidStudioProjects\MyApplication2\build.gradle.kts' line: 5

Plugin [id: 'com.android.application', version: '8.2.0', apply: false] was not found in any of the following sources:

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.2.0', 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:8.2.0')
  Searched in the following repositories:
    Google
    MavenRepo

here is more info:

enter image description here

I have tried changing gradle version, updated to latest jdk version, tried almost everything available on internet

3

There are 3 best solutions below

1
Simon Jacobs On

Make sure you have the line gradlePluginPortal() in your pluginManagement.repositories block in settings.gradle:

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}
1
27_mohit _dhote_2B On

I have fix this error by reinstalling android studio with standard setting none of the given method worked for me i have tried everything available on internet. but before that you have to uninstall the complete android studio.

0
Mahdi On

I had used the same versions and faced to the same problem. I searched a lot in stackoverflow and other websites and after 2 hours I found a solution for my problem and that was setting proxy. I used fodev.org host It is really simple just follow this path :

File>Setting>Appearance & Behavior>System Settings>HTTP Proxy

select manual proxy and set host name and port as below :

Host Name : fodev.org
port Number : 8118