Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

In Android Studio, just go to File -> Settings -> Build, Execution, Deployment -> Compiler and click to uncheck the configure on demand option, then click Ok and Sync Project with gradle files again.


I get same error after update to AS 3.1.2. You can still use Gradle version 4.6 but downgrade Android gradle plugin to 3.1.1

EDIT: just invalidate cache and restart


It is already known bug in Android studio even in the Documentation, They have mentioned about this Problem.

The easiest way right now is to disable this feature by going

  1. Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences).
  2. In the left pane, click Build, Execution, Deployment > Compiler.
  3. Un check the Configure on demand checkbox.
  4. Click Apply or OK.

Check this Image for warning they have provided for specific Gradle plugin versions.

enter image description here


Other 'solution' is use the suggestion by Android Studio. Plugin Android Gradle 3.1.3 and Gradle version 4.4.

enter image description here