demoViewModel = ViewModelProviders.of(this).get(DemoViewModel.class);
这种写法在新版的android studio3.5中已经淘汰,需改为
demoViewModel =new ViewModelProvider(this).get(DemoViewModel.class);
demoViewModel = ViewModelProviders.of(this).get(DemoViewModel.class);
这种写法在新版的android studio3.5中已经淘汰,需改为
demoViewModel =new ViewModelProvider(this).get(DemoViewModel.class);
本文标题:#android开发小知识点
本文链接:https://www.haomeiwen.com/subject/uizjzhtx.html
网友评论