kotlin intellij-idea

intellij idea - 遇到错误:(22,20)Kotlin:未解决的参考:添加string命令时出现字符串错误

发布于 2020-03-27 12:08:51

我收到此错误错误:(22,20)Kotlin:未解析的参考:当我向我在Intellij中制作的learnign程序中添加一些代码时,它运行正常,直到我添加string命令,然后得到上面的错误。使用ideaIC-2019.1.3.exe安装了jdk-11.0.3_windows-x64_bin,但不确定是否使用的是正确的SDK?还是这是问题的起因?

var department:string?
department = null
department ="software Engineering"
println ("department ${department}")

信息:Kotlin:kotlinc-jvm 1.3.40(JRE 11.0.3 + 12-LTS)信息:由于项目配置/依赖关系的变化,“变量”模块已完全重建

信息:2019/03/07 16:20-构建在2 s 534 ms中完成1次错误和0条警告C:\ Users \ lanca \ IdeaProjects \ Varibles \ src \ DataTypes.kt错误:Error:line(22)Kotlin:未解析的参考:字符串

查看更多

查看更多

提问者
Dave
被浏览
119
Dave 2019-07-05 01:18

感谢@forpas,此问题已解决! 在此处输入图片说明