Notification texts go here Contact Us Buy Now!

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

Problem:

Trying to use the Android Gradle Plugin 8.0.2, but encountering the error "Plugin [id: 'com.android.application', version: '8.0.2', apply: false] was not found in any of the following sources".

Possible Solutions:

  1. Update Android Studio:
  2. Ensure you are using the latest version of Android Studio. The issue could be due to an outdated version of Android Studio not supporting the latest Gradle Plugin version.

  3. Check Gradle Plugin Compatibility:
  4. Verify that the Gradle Plugin version you are trying to use is compatible with your current Android Studio version. Refer to the Android Developer documentation for compatibility information: https://developer.android.com/studio/releases/gradle-plugin?hl=zh-cn#updating-gradle

  5. Edit Gradle Wrapper:
  6. Open the gradle-wrapper.properties file in your project and update the distributionUrl to the latest Gradle version. For example:

    distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
    
  7. Configure Plugin Repositories:
  8. In your project's settings.gradle file, ensure that the plugin repositories are correctly configured. Add the following block if it's missing:

    pluginManagement {
        repositories {
            google()
            mavenCentral()
            gradlePluginPortal()
        }
    }
    
  9. Specify Plugin Version:
  10. In the build.gradle file of your app module, specify the exact version of the Android Gradle Plugin you want to use:

    plugins {
        id 'com.android.application' version '8.0.2' apply false
    }
    
  11. Update Kotlin Version (if applicable):
  12. If you are using Kotlin in your project, ensure that the Kotlin version is compatible with the Gradle Plugin version. Refer to the Kotlin documentation for compatibility information.

  13. Clean and Rebuild Project:
  14. Try cleaning and rebuilding your project by selecting Build > Clean Project and then Build > Rebuild Project from the Android Studio menu.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.