Android编程知识

Didn't find class "kotlin.reflect.KProperty"报错

2022-10-16 227 0

简介 Didn't find class "kotlin.reflect.KProperty"

解决方案:请配置kotlin开发环境 参考Kotlin官网

步骤1: 在根目录下的buid.gradle

buildscript {
    ext {
        kotlinVersion = '1.3.40'
    }
    dependencies {
        ......
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

步骤2: 在module目录下的buid.gradle

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

dependencies {
    ......
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}

点赞 0

我的名片

网名:梦宇信息技术

职业:软件开发、Mes系统工程师

现居:福建省-福州市

QQ:703159

站点信息

  • 联系QQ:703159
  • 文章统计97篇文章
  • 标签总数6
  • 加我微信:扫码,加我微信