今天在项目中引入permissionsdispatcher权限适配框架之后发现butterknife注解框架点击事件失效了,初始化正常,就是点击时间失效,查看了一下apt冲突相关信息,看到这篇文章有提到类似的消息,大概就是google的gradle中包含了apt的功能,然后就改了一下集成方式,去除了app的build.gradle中顶部的
//apply plugin: 'android-apt'
把
dependencies {
...
compile 'com.github.hotchemi:permissionsdispatcher:2.3.1'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
...
}
改成:
compile 'com.github.hotchemi:permissionsdispatcher:2.3.1'
provided 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
然后butterknife框架就正常了。。
————————-2017年3月7日17:38:55————————————