MainActivity::class.java 未解决的引用:java?

问题描述 投票:0回答:0

使用 Realm 库后,我在 android studio 中遇到反射问题。 我正在使用这个实现并且已经添加了 jar 文件但仍然没有解决“java”:

implementation("org.jetbrains.kotlin:kotlin-reflect:1.8.10")
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

还有这个:

buildscript {
ext.kotlin_version = "1.3.72"
repositories {
    google()
    jcenter()
    mavenCentral()
}
dependencies {
    classpath "com.android.tools.build:gradle:4.1.2"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "io.realm:realm-gradle-plugin:10.11.1"


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

我尝试了所有这些解决方案并且没有改变

android android-studio kotlin reflection realm
© www.soinside.com 2019 - 2024. All rights reserved.