遇见Plugin [id: 'org.jetbrains.kotlin.android'] was not found in any of the following sources:?

1.首先检查在构建脚本的顶部没有正确添加Kotlin插件。请确保在构建脚本的顶部添加以下行:

apply plugin: 'kotlin-android'

 2. 确保在构建脚本中使用正确的Kotlin插件版本:

classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"

3.请确保在构建脚本的顶部添加JCenter仓库的声明:

repositories { jcenter() } 

或者 

repositories { mavenCentral() } 

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐