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:
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:
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()
beforegradlePluginPortal()
mavenCentral()
beforegoogle()
2. Check Gradle Offline Mode
DANGER
One of the most common causes is accidentally enabling Gradle's offline mode.
To disable offline mode:
- Open Android Studio
- Go to View → Tool Windows → Gradle
- Click the Toggle Offline Mode button (appears as a cloud with slash when active)
- Sync your project again
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:
# 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:
- Export the security certificate
- Add it to your JRE keystore using KeyTool with administrative privileges
4. Ensure Correct JDK Version
Android Studio Bumblebee+ requires JDK 11 or later:
- Go to File → Project Structure → SDK Location
- Under JDK version, select JDK 11 or later
- Apply changes and sync your project
Additional Troubleshooting Steps
Clear Gradle Cache and Restart
Sometimes, clearing the Gradle cache resolves the issue:
- Close Android Studio
- Delete the
.gradle
folder in your user directory - Delete the
build
folder in your project directory - 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:
- Look for both
settings.gradle
andsettings.gradle.kts
files - Consolidate all
include()
statements into a single file - 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:
- Visit Gradle distributions page
- Download the required version (e.g.,
gradle-7.3.3-bin.zip
) - In Android Studio, go to File → Settings → Build, Execution, Deployment → Gradle
- Select Use Gradle from and specify the downloaded location
Corporate Network Solutions
For corporate environments with strict security:
// 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:
- Create a new project and migrate your code gradually
- Downgrade Android Studio to a previous stable version
- 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.