SJ1*_*J19 4 plugins intellij-idea gradle kotlin
我正在尝试使用gradle构建项目,但即使我确实使用“从磁盘安装插件”添加了它,也似乎找不到我的kotlin插件。
这是我得到的错误:
无法解析配置':classpath'的所有依赖关系。找不到org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.0-release-1038。在以下位置搜索:https : //repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-release-1038/kotlin-gradle-plugin-1.0.0-release- 1038.pom https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.0-release-1038/kotlin-gradle-plugin-1.0.0-release-1038.jar
谁能帮我这个?我真的很想建立我的项目。
我可以猜想您在build.gradle中没有存储库,因此请比较您的构建文件与以下内容,然后在Idea中进行“ Gradle Refresh”。
buildscript {
ext.kotlin_version = '<version to use>'
repositories {
mavenCentral()
// or better:
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: "kotlin"
repositories {
mavenCentral()
// or better:
jcenter()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Run Code Online (Sandbox Code Playgroud)
请多加注意config的buildscript部分:这里的存储库是必需的!
我从这里得到了配置,并做了一些细微的改进。
| 归档时间: |
|
| 查看次数: |
4659 次 |
| 最近记录: |