0

when i try to build android application i get this error:

Configuration on demand is not supported by the current version of the Android Gradle plugin since you are using Gradle version 4.6 or above. Suggestion: disable configuration on demand by setting org.gradle.configureondemand=false in your gradle.properties file or use a Gradle version less than 4.6.

after adding this line into this file as gradle.properties and try to build again, i get error too

org.gradle.daemon=true

org.gradle.jvmargs=-Xmx6144M -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

org.gradle.parallel=true

android.enableBuildCache=true
org.gradle.configureondemand=false
DolDurma
  • 15,753
  • 51
  • 198
  • 377
  • Try restarting your AndroidStudio. Since `org.gradle.daemon` is true, your gradle daemon must be already running. – Sagar Waghmare Jul 23 '18 at 17:07
  • @SagarWaghmare not any affect :( – DolDurma Jul 23 '18 at 17:43
  • 2
    Sometimes I have to go to File -> Settings -> Build, Execution, Deployment -> Compiler and uncheck the "configure on demand" checkbox once for a project. (The same steps may be necessary again for the next project) – Bö macht Blau Jul 23 '18 at 17:47

1 Answers1

0

I think there is no way to solve it except unchecking "configure on demand". Take a look at This Answer.

Alireza Noorali
  • 3,129
  • 2
  • 33
  • 80