错误提示:Failed to apply plugin [id 'kotlin-android']
> The current Gradle version 5.6.4 is not compatible with the Kotlin Gradle plugin. Please use Gradle 6.1.1 or newer, or the previous version of the Kotlin plugin.
第一步,在project下的build.gradle中的repositories下添加(注意:buildscript和allprojects下都有repositories):
repositories {
jcenter()
google()
}
第二步,同样在project下的dependencies中添加下面这句(后面的版本需要按照对照表来,否则肯定出错,PS:kotlin版本要按照对照表来,我这里定了1.4.20)(我这里是4

本文介绍了在Android Studio中遇到Kotlin插件无法使用的问题,详细阐述了解决方案,包括更新Gradle版本,修改build.gradle文件中的依赖,并针对模块化项目提供了额外的配置建议。同时,还提到了Android的View Binding新写法。

1万+

被折叠的 条评论
为什么被折叠?



