首页 > 解决方案 > 如何在 Kotlin 中声明变量?我收到“未解决的参考”

问题描述

我在编译时遇到错误message_text

在此处输入图像描述

标签: androidkotlin

解决方案


start_button您永远不会为点击侦听器“关闭” lambda 。添加右花括号}

    ...
    text_id.text = "my text"
} // <- this one's missing

推荐阅读