一、问题描述 最近写完一段代码,关于使用switch case语句来判断R.id的时候,出现了如下所示的警告: 代码类似于下面这样,出现了警告。 int id = view.getId(); switch (id) { case R.id.button1: action1(); break