button.setOnClick Listener{}button报红,编辑过后Unresolved reference:button,帮忙看一下有什么问题?
kotlin-android-extensions插件已经被废弃了。你可以使用viewBinding或者直接用findViewById获取控件。没声明的变量肯定无法使用的,这是基本语法
ViewBinding