但是,当我尝试分配ID时,Android Studio会将其标记为错误:
view.setId(123); ERROR: Expected resource of type id
view.setId(View.generateViewId());