Butter Knife Attention: This tool is now deprecated. Please switch to view binding. Existing versions will continue to work, obviously, but only critical bug fixes for integration with AGP will be considered. Feature development and general bug fixes have stopped.ding.
上边来自 ButterKnife github 主页。虽然一代神库要落下帷幕了,但是它带给了我们很多。通过学习它可以get 到很多技能,这些很重要。
具体原因见(asset/pic3.png)
解决思路:提供一个AS插件,实时监测xml文件变动,就像R那样,coding阶段也生成一份R2文件(有别于编译阶段的R2), 这样既可以提示开发者,又能把爆红信息取掉。