Skip to content

Android Gradle Plugin 'com.android.application' Not Found - Troubleshooting Guide

Problem Statement

When upgrading to Android Studio Bumblebee or later versions, you may encounter the error: Plugin [id: 'com.android.application', version: '7.1.0', apply: false] was not found in any of the following sources. This error prevents your project from building and usually indicates issues with Gradle configuration, network connectivity, or plugin repository access.

The error typically appears in your project's build.gradle file when using the new plugins block syntax:

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

Primary Solutions

1. Configure Proper Repository Settings

Starting with Android Gradle Plugin (AGP) 7.1.0+, you need proper repository configuration in your settings.gradle file:

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

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

rootProject.name = 'YourProjectName'
include ':app'

WARNING

The order of repositories matters. Try different orders if the default configuration doesn't work:

  • google() before gradlePluginPortal()
  • mavenCentral() before google()

2. Check Gradle Offline Mode

DANGER

One of the most common causes is accidentally enabling Gradle's offline mode.

To disable offline mode:

  1. Open Android Studio
  2. Go to View → Tool Windows → Gradle
  3. Click the Toggle Offline Mode button (appears as a cloud with slash when active)
  4. Sync your project again

Toggle Offline Mode

3. Verify Network Connectivity and Proxy Settings

Checking Proxy Configuration

Corporate networks or specific internet configurations might block access to Gradle repositories.

Check your gradle.properties files (both global and project-level) for proxy settings:

properties
# Remove or update these if you're not using a proxy
systemProp.http.proxyHost=
systemProp.http.proxyPort=80
systemProp.https.proxyHost=
systemProp.https.proxyPort=80

If you're behind a corporate firewall with ZScaler or similar security software:

  1. Export the security certificate
  2. Add it to your JRE keystore using KeyTool with administrative privileges

4. Ensure Correct JDK Version

Android Studio Bumblebee+ requires JDK 11 or later:

  1. Go to File → Project Structure → SDK Location
  2. Under JDK version, select JDK 11 or later
  3. Apply changes and sync your project

JDK Configuration

Additional Troubleshooting Steps

Clear Gradle Cache and Restart

Sometimes, clearing the Gradle cache resolves the issue:

  1. Close Android Studio
  2. Delete the .gradle folder in your user directory
  3. Delete the build folder in your project directory
  4. Restart Android Studio and sync the project

Check for Multiple Settings Files

If you've added modules to your project, you might have conflicting settings files:

  1. Look for both settings.gradle and settings.gradle.kts files
  2. Consolidate all include() statements into a single file
  3. Delete the unnecessary settings file

Verify Plugin Version Compatibility

Ensure the plugin version matches your Gradle version. Check the official compatibility table and update accordingly.

Advanced Solutions

Manual Plugin Download

If network issues persist, manually download the required Gradle distribution:

  1. Visit Gradle distributions page
  2. Download the required version (e.g., gradle-7.3.3-bin.zip)
  3. In Android Studio, go to File → Settings → Build, Execution, Deployment → Gradle
  4. Select Use Gradle from and specify the downloaded location

Corporate Network Solutions

For corporate environments with strict security:

gradle
// Add these to your settings.gradle for JitPack and other repositories
pluginManagement {
    repositories {
        maven { url "https://jitpack.io" }
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

When All Else Fails

If none of the above solutions work:

  1. Create a new project and migrate your code gradually
  2. Downgrade Android Studio to a previous stable version
  3. Check Android Studio updates - newer versions may have fixed the issue

TIP

Always check the official Android Gradle plugin release notes for the latest compatibility information and known issues.

Conclusion

The "plugin not found" error in Android Studio Bumblebee typically stems from repository misconfiguration, network issues, or JDK incompatibility. Start with the repository configuration in settings.gradle, verify your network connectivity, and ensure you're using JDK 11+. Most cases are resolved by these fundamental checks before moving to more advanced troubleshooting steps.