Configuration on Demand Is Not Supported by the Current Version of the Android Gradle Plugin

Configuration on demand is not supported by the current version of the Android Gradle plugin

No need to downgrade!

Disabling configure on demand requires two steps:

  1. Remove org.gradle.configureondemand from gradle.properties.

  2. In Android Studio,

    For Mac go to the Preferences > Build, Execution, Deployment > Compiler and uncheck the configure on demand.

    For Linux/Windows go to the File > Settings > Build, Execution, Deployment > Compiler and uncheck the configure on demand.

Note, there are 2 gradle.properties files

  1. In your project gradle.properties
  2. ${HOME}/.gradle/gradle.properties

Why Configuration on demand is not supported by the current version of the Gradle plugin?

The reason why configuration on demand has been "removed" is to avoid unpredictable build error.

You still use gradle 4.4 though.

See Known issue about Android Studio

Configuration on demand with Gradle 4.6: If you're using either Android Plugin for Gradle 3.0.1 or 3.1.0 with Gradle 4.6, you should disable configuration on demand in your gradle.properties file, as shown below, to avoid some unpredictable build errors. This issue should be fixed in a future version of the plugin.

org.gradle.configureondemand=false

The project is using an incompatible version (AGP 7.3.0-alpha07) of the Android Gradle plugin

Update to the latest version of Android Studio i.e. Dolphin and your problem will be resolved



Related Topics



Leave a reply



Submit