美文网首页
一:None of the following candidat

一:None of the following candidat

作者: 禄眠 | 来源:发表于2020-04-02 11:41 被阅读0次

    错误日志

    Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:

    出错代码

    val update = flightConfigViewModel.updateFlightConfigName(name, configId, userId!!)
    if (update > 0) {  // 就这行
        toast.showToast("修改成功")
    } else {
        toast.showToast("修改失败")
    }
    

    解决办法

    我这篇博客:解决kotlin中isNullOrEmpty错误

    更新Kotlin版本

    buildscript {
        ext.kotlin_version = '1.3.61'  // 最新版1.3.71
        repositories {
            google()
            jcenter()
            
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.6.2'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    

    然后就好了

    但是我又把版本退回去再试了下,居然也不报错了?!真是奇怪

    相关文章

      网友评论

          本文标题:一:None of the following candidat

          本文链接:https://www.haomeiwen.com/subject/paztphtx.html