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

記錄一個gradle版本問題

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.

 

解決辦法:

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

來源:https://stackoverflow.com/questions/49990933/configuration-on-demand-is-not-supported-by-the-current-version-of-the-android-g

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章