Configuring Gradle for Android Development

Solutions for common Gradle issues faced in Android development for beginners

Configuring Gradle for Android Development
Photo by Denny Müller / Unsplash

Android Gradle Plugin and compatible Gradle Version
Gradle Plugin


  • android/gradle/wrapper/

Change of Version

remove folder ~/.gradle and reopen Android Studio to trigger auto rebuild

Android Gradle Plugin (AGP)

buildscript {
    dependencies {
        classpath ''

the two versions (e.g. 7.6.1 and 7.4.2) must be compatible to build correctly


follows the proxy setting configured in Android Studio

  • Preferences | Appearance & Behavior | System Settings | HTTP Proxy

Java Compatibility

Kotlin Compatibility