使用butterknife bind之后依然运行报空指针问题解决方法
2017-03-03 15:52
411 查看
butterknife8.0之后才有apt方式,配置方法如下:
在项目的gradle文件的dependencies中增加
在应用的gradle文件中添加:
在项目的gradle文件的dependencies中增加
dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' }
在应用的gradle文件中添加:
apply plugin: 'com.neenbedankt.android-apt' dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:24.2.1' testCompile 'junit:junit:4.12' compile project(':core') compile 'com.jakewharton:butterknife:8.4.0' apt 'com.jakewharton:butterknife-compiler:8.4.0' }
相关文章推荐
- visual studio设置为使用IIS运行网站时加载项目遇到权限问题的解决方法
- OS X升级到10.10之后使用pod出现问题的解决方法
- Android Studio使用Butterknife时出现空指针问题解决
- android studio使用ButterKnife 8.0.1报空指针错误以及点击事件无效的解决方法
- visual studio设置为使用IIS运行网站时加载项目遇到权限问题的解决方法
- OS X升级到10.10之后使用pod出现问题的解决方法
- 升级到mac 10.10之后使用pod出现问题的解决方法
- 使用pyinstaller打包成exe之后运行闪退,调试后报出 Unable to acquire Oracle environment handle错误解决方法
- ASP.NET Core2.0 使用VSCode 版本1.13.1工具 开发控制台运行出现中文乱码问题及解决方法
- Android Studio使用Butterknife时出现空指针问题解决
- 使用butterknife中遇到的几个问题及解决方法
- 关于安装IE8之后VS2008使用MFC出现问题的解决方法
- 关于使用UIAlertView之后pop或者push时键盘闪退问题解决方法
- 安装完vs.2005之后,重新安装iis后无法使用http方式访问asp.net工程的页面的问题的解决方法
- VS2012 WIN7下使用DotNetBar 使用Office2007Form皮肤 窗体运行不显示问题解决方法
- OS X升级到10.10之后使用pod出现问题的解决方法
- OS X升级到10.10之后使用pod出现问题的解决方法
- OS X升级到10.10之后使用pod出现问题的解决方法
- spark程序打包集群运行方法及使用中的几个问题解决
- 使用workbench运行更新语句时出现如下问题与解决方法。