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。

解决

Goto 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

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

欢迎各位关注在下的微信公众号“张氏文画”,不光有新鲜的 LeetCode 题解(多种思路,包教包会,开拓思维),还有经典的文章及短视频和大家分享,一起嘿嘿嘿

张氏文画.jpg

——乐于分享,共同进步,欢迎留言讨论
——Treat Warnings As Errors
——Any comments greatly appreciated
——Talking is cheap, show me the code
——CSDN:https://blog.csdn.net/u011489043
——简书:https://www.jianshu.com/u/4968682d58d1
——GitHub:https://github.com/selfconzrr

全部评论

相关推荐

昨天 15:02
门头沟学院 Java
刚打开网申页面就不想填了,还是不要为难自己了
poppinzhan...:多益老行业毒瘤了,碰到徐波这种恶心的烂人,去了也是受罪。
点赞 评论 收藏
分享
小鹏、大疆、米哈游、MinMax小鹏上午投的下午就约面,进度未免也太快了
蛇年行大运fff:哥们 盗贴有意思吗,我发xhs上的给你搬过来了😅😅😅
点赞 评论 收藏
分享
湫湫湫不会java:先投着吧,大概率找不到实习,没实习的时候再加个项目,然后把个人评价和荣誉奖项删了,赶紧成为八股战神吧,没实习没学历,秋招机会估计不多,把握机会。或者说秋招时间去冲实习,春招冲offer,但是压力会比较大
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-15 17:46
暑期就挂了,秋招还有机会吗
大聪明777:研发提前批,14号刚开的,官网上面的配图上有写。提前批没过的话,秋招还可以投,不过前面的笔试/面试记录会被保留,供秋招参考
26届校招投递进展
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务