我遇到的问题是: setContentView(R.layout.acitivty_main); setContentView(mainBinding.getRoot); 应该使用下面的来绑定布局,不然用之后给控件绑定事件不生效。