You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在build.gradle.kts中配置View Binding遇Unexpected tokens报错求助

在build.gradle.kts中配置View Binding的错误修正

你写的配置代码buildFeatures {viewBinding; true}存在语法错误,问题出在多余的分号上——Kotlin DSL语法里,设置buildFeatures属性不需要用分号分隔属性名和对应的值。

正确的配置代码如下:

buildFeatures {
    viewBinding true
}

内容的提问来源于stack exchange,提问作者asdf18

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 05:23:08