DataBindingUtil.setContentView - Type parameter T has incompatible upper bounds

前端 未结 9 764
逝去的感伤
逝去的感伤 2021-02-02 06:54

\"Android Studio\" shows error message \"Type parameter T has incompatible upper bounds: ViewDataBinding and ActivityChecklistsBinding.

ActivityChecklistsBindin         


        
9条回答
  •  广开言路
    2021-02-02 07:12

    You should use ActivityMainBinding in place of your Activity class name.

    ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_checklists);
    

提交回复
热议问题