Android Gradle Plugin 7.1.3, Plugin [id: 'com.android.application', version: '7.1.3', apply: false] was not found in any of the following sources [closed]
Asked Answered
A

6

28

Since I upgraded my project to Android Gradle Plugin 7.1.3, I can't build it anymore.

Error :

Plugin [id: 'com.android.application', version: '7.1.3', 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.

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

build.gradle :

plugins {
    id 'com.android.application' version '7.1.3' apply false
    id 'com.android.library' version '7.1.3' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

settings.gradle :

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}

include ':app'
rootProject.name = "MyApp"

The problem occurred after I clicked the "Begin Upgrade" button below the following message :

To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you upgrade the Android Gradle Plugin in this project (MyApp) from the current version 7.1.2 to version 7.1.3.

Afar answered 7/4, 2022 at 11:2 Comment(5)
It looks like Bumblebee has been updated but 7.1.3 isn't actually released yet. Rollback to 7.1.2 but keep an eye out - they'll actually roll 7.1.3 out on maven central pretty soon.Digitalis
I'm experiencing the same after clicking Bumblebee's update proposition and I believe Barry is right in that 7.1.3 hasn't been rolled out yet (can't find it on mvnrepository.com/artifact/com.android.tools.build/…). I solved it by reverting to 7.1.2 and clicking "remind me tomorrow".Tristichous
Android Gradle Plugin 7.1.3 has been released. Problem solved.Afar
This issue can be solved by disabling firewall software like Netskope etc. If you have any firewall installed in your system it may block downloads for the gradle dependencies.Hime
In settings.gradle.kts pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() } }Coaming
A
5

Android Gradle Plugin 8.0.0 has been released. Problem solved.

Project build files are up-to-date for Android Gradle Plugin version 8.0.0.
Afar answered 8/4, 2022 at 9:36 Comment(3)
Seems like an outdated versionAwlwort
@Awlwort You can find the latest version available here : docs.gradle.org/current/userguide/compatibility.htmlAfar
I'm facing the same error in Android Gradle Plugin 8.2.0. Whoever created Gradle really hated Android developers.Menides
R
11

I know I am late in answering to this query and I am also aware that Android Gradle Plugin 7.1.3 has been released which solved the problem. But I just found out another issue with android studio and that is, when you're in proxy network. When in proxy network and we apply proxy settings and then if you switch to non-proxy network then the proxy details are still saved inside gradle.properties(Global Properties) file and that details are causing trouble to connect and download gradle files when we switch to non-proxy network. I faced this issue and when I remove all the proxy details manually from the gradle.properties(Global Properties) file then the problem is solved. I hope this helps for someone facing the same issue.

Romine answered 23/4, 2022 at 7:32 Comment(1)
that is the only correct answer to the problem, I have been stuck for 2 days now, thanks!Incudes
S
6

I just had this problem too after receiving a recommendation to upgrade Gradle plugin, here's what I did,

I changed the following

plugins {
    id 'com.android.application' version '7.1.3' apply false
    id 'com.android.library' version '7.1.3' apply false
}

in the build.gradle(Project: MyProjectName)

to this

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
}

and clicked on 'try again'

it SOLVED my issue

Swearingen answered 7/4, 2022 at 15:18 Comment(2)
Typical with studio to fix an bug you have to just manually undo the update. This worked, although now I'll have to continually ignore the Update Gradle warning.Cibis
If this answers doesn't work, check if any firewall enabled in your system. you can disable the firewall and try againHime
A
5

Android Gradle Plugin 8.0.0 has been released. Problem solved.

Project build files are up-to-date for Android Gradle Plugin version 8.0.0.
Afar answered 8/4, 2022 at 9:36 Comment(3)
Seems like an outdated versionAwlwort
@Awlwort You can find the latest version available here : docs.gradle.org/current/userguide/compatibility.htmlAfar
I'm facing the same error in Android Gradle Plugin 8.2.0. Whoever created Gradle really hated Android developers.Menides
W
3

Your plugin imports look odd to me

plugins {
    id 'com.android.application' version '7.1.3' apply false
    id 'com.android.library' version '7.1.3' apply false
   
    ... other plugins go here
}

I would only expect to see one of these; either the application if this is your application module, or the library if this is a library module. Maybe try removing the one you don't need?

As an aside, I have just done the same upgrade as you, from 7.1.2 to 7.1.3, and it worked fine.

I've no idea how the distribution system works but another option might be that as it seems like it's just been released maybe whatever content delivery network your computer is connecting to hasn't received the update and if you just wait a bit and try again it might work.

Wooley answered 8/4, 2022 at 9:3 Comment(0)
C
0

I checked in my build.gradle file and saw that my plugin version is as below

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
}

It is the latest and February-released version click the below link for getting info on the Gradle version. https://developer.android.com/studio/releases/gradle-plugin#7-1-0

I checked all versions but have not found the 7.1.3 version. If you entered this version manually then make them 7.1.2 as code above and run again. Because error is also say that version 7.1.3 not not found in any of the following sources

If the problem is the same. Let me know.

Cacodyl answered 7/4, 2022 at 11:20 Comment(4)
I did not change the version manually. Android studio did it, after I clicked the "Begin Upgrade" button below the following message : "To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you upgrade the Android Gradle Plugin in this project (MyApp) from the current version 7.1.2 to version 7.1.3."Afar
@Denis OK go to File> and click Sync project with Cradle and run again if not solved. click on invalidate cache and run again. I solve my issue using this method. if problem is still then go to Build>Clean project then Rebuild project. Hope it help.Cacodyl
@Denis You should definitely not randomly upgrade AGP (or anything for that matter) without briefly going through the release notes.Rees
@Rees yes, keep ignoring updates if updated versions and notes are not released. and i already provided link of release notes. You can see the latest and recent update is 7.1.2 (February) release.Cacodyl

© 2022 - 2024 — McMap. All rights reserved.