gpt4 book ai didi

java - 安卓工作室 : Could not get unknown property 'kotlin_version'

转载 作者:行者123 更新时间:2023-12-04 23:47:42 35 4
gpt4 key购买 nike

here git 克隆后,
我第一次遇到这个错误:

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\...\voicegym\app\build.gradle' line: 3

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not initialize class org.jetbrains.kotlin.gradle.internal.KotlinSourceSetProviderImplKt
关注 this advice ,我将这些添加到 build.gradle (Project: voicegym)
buildscript {
ext.kotlinVersion = '1.3.72' // previously '1.2.60'
ext.springBootVersion = '2.0.4.RELEASE'
ext.anko_version='0.10.4'
repositories {
...
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
现在,我有这个错误
Build file 'C:\...\voicegym\build.gradle' line: 5

A problem occurred evaluating root project 'voicegym'.
> Could not get unknown property 'kotlin_version' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

最佳答案

实验后应该是ext.kotlin_version=...而不是 ext.kotlinVersion =...

buildscript {
ext.kotlin_version= '1.3.72' // previously '1.2.60'
ext.springBootVersion = '2.0.4.RELEASE'
ext.anko_version='0.10.4'
repositories {
...
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

关于java - 安卓工作室 : Could not get unknown property 'kotlin_version' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64834818/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com