Could not find method coreLibraryDesugaringEnabled

For Android Studio 3.6.3, make sure

  • Android Gradle Plugin Version: 4.0.0-beta04
  • Gradle Version: 6.1.1

NOTE: Check gradle version at Android Studio -> File -> Project Structure -> Project

Android Gradle Plugin Version: top level / project build.gradle

buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0-beta04'
    }
}

Gradle Version: gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

NOTE: It still show a few desugar-related related warning, perhaps need experiment with higher gradle version or use Android Studio 4.0 (currently in Beta 4)

Ocassionaly it might complain of the following error, which could be temporay resolved by Android Studio -> Build -> Rebuild Project.

com.intellij.openapi.externalSystem.model.ExternalSystemException: This version of Android Studio cannot open this project, please retry with Android Studio 4.0 or newer.

NOTE: At the end, I use Android Studio 4.0 Beta 4 due to some IDE annoyance.

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.