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

2

3

Please assist, I am new to android studio none of the solutions provided in the previously asked questions has worked for me. I keep receiving the error:

Gradle sync failed: Plugin [id: 'com.android.application', version: '7.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:7.2.0') Searched in the following repositories: Gradle Central Plugin Repository Google MavenRepo

This is my gradle-wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

settings.gradle

pluginManagement {
    repositories {
        //maven { url "https://plugins.gradle.org/m2/" }
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
    }
}
rootProject.name = "projectname"
include ':app'

Project build.gradle

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

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

build.gradle

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'org.jetbrains.kotlin.android.extensions'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "com.tdsoft.limabot"
        minSdk 21
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}
dependencies
{
}

I have added java(JDK-18.0.0.1) to the path in environmental variables and my grade in android studio Gradle JDK is set to Embedded JDK version 11.0.12. I would greatly appreciate any form of assistance.

Edit: Unfortunately, changing the project build version has not solved the issue.

Postpositive answered 24/7, 2022 at 14:58 Comment(1)
T
0

Try to change the versions from 7.2.0 to 7.2.1 in project level build.gradle

id 'com.android.application' version '7.2.1' apply false
id 'com.android.library' version '7.2.1' apply false
Toussaint answered 24/7, 2022 at 15:15 Comment(1)
Thanks but unfortunately the issue still persists after this.Postpositive
W
0

I ran into the same issue. What I tried:

  • changed the gradle version, changed the gradle plugin version
  • changed repositories where packages are searched
  • set proxy settings in gradle.properties file
  • set proxy settings in Windows 10 network settings

None of this helped me, and I installed a proxy program that can wrap the traffic of individual applications on the computer, and it worked! It was a Proxyfire program - it has a 30-day free version. The problem of accessing Google services in my case is related to local restrictions.

Wagon answered 17/12, 2022 at 12:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.