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

问题描述

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.

解释

由于使用你正在使用 Gradle 版本4.6或以上,当前版本的 Android 的 Gradle 插件不支持按需配置。建议:通过在你的 gradle.properties 文件中设置 org.gradle.configureondemand=false 禁用按需配置,或者使用一个低于4.6版本的 Gradle。

解决

File -> Settings -> Build, Excecution, Deployment -> Compiler and uncheck Configure on Demand.

NOTE:I am using Android Gradle com.android.tools.build:gradle:3.1.4 and Gradle 4.10.2 (check in File -> Project Structure -> Project).

根据其指示,在 AndroidStudio 中使用 ctrl + shift + F 全局搜索 org.gradle.configureondemand 关键字,将 true 改为 false;若未解决 ctrl + alt + s 调出 setting,取消 Configure on demand 的勾选,如下图:

image.png

重新编译项目,则报错信息消失。

------至所有正在努力奋斗的程序猿们!加油!!
有码走遍天下 无码寸步难行
1024 - 梦想,永不止步!
爱编程 不爱Bug
爱加班 不爱黑眼圈
固执 但不偏执
疯狂 但不疯癫
生活里的菜鸟
工作中的大神
身怀宝藏,一心憧憬星辰大海
追求极致,目标始于高山之巅
一群怀揣好奇,梦想改变世界的孩子
一群追日逐浪,正在改变世界的极客
你们用最美的语言,诠释着科技的力量
你们用极速的创新,引领着时代的变迁

——乐于分享,共同进步,欢迎补充
——Any comments greatly appreciated
——诚心欢迎各位交流讨论!QQ:1138517609
——CSDN:https://blog.csdn.net/u011489043
——简书:https://www.jianshu.com/u/4968682d58d1
——GitHub:https://github.com/selfconzrr

发布了79 篇原创文章 · 获赞 207 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/u011489043/article/details/88350668