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:
Remove
org.gradle.configureondemand
from gradle.properties.In Android Studio,
For Mac go to thePreferences
>Build, Execution, Deployment
>Compiler
and uncheck the configure on demand.
For Linux/Windows go to theFile
>Settings
>Build, Execution, Deployment
>Compiler
and uncheck the configure on demand.
Note, there are 2 gradle.properties
files
- In your project
gradle.properties
${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