ButterKnife使用出现Nullpointerexception
2017-11-10 11:52
459 查看
出现这个问题可能是你看的 Butterknife使用列子是 8.0以下的
简单的说呢。就是之前只加了 compile ‘com.jakewharton:butterknife:8.0.1’
简解决办法:
在你的android studio 不是 3.0版本的话
简单的说呢。就是之前只加了 compile ‘com.jakewharton:butterknife:8.0.1’
简解决办法:
在你的android studio 不是 3.0版本的话
1.在build.gradlec(Project)中添加这个 :
lasspath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
2.在build.grodlec(app) : 顶部添加
apply plugin: 'com.neenbedankt.android-apt'
然后在 dependencies{ 添加这俩句
compile 'com.jakewharton:butterknife:8.0.1' apt 'com.jakewharton:butterknife-compiler:8.0.1'
} 在编译一下就可以了
如果你的AndroidStudio 是3.0
只需要在 build.grodlec(app) 下添加俩句话就可以了:compile 'com.jakewharton:butterknife:8.0.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.0.1'
相关文章推荐
- 使用Butterknife注解出现nullPointerException异常
- Android使用butterknife注解出现nullPointerException解决
- 使用Eclipse开发Android出现java.lang.NullPointerException错误的解决方法
- <Opencv for Android 调试>加载XML模型,使用SVM.predict出现的NullPointerException问题
- Android布局文件使用<include>标签出现NullPointerException问题
- 关于使用新版本的BufferKnife出现NullPointerException的问题
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- IDE中使用Console出现NullPointerException错误
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- Eclipse中使用butterknife出现nullPointerException
- SSH使用modelDriven传值出现空指针异常 java.lang.NullPointerException
- UiAutomator使用getUiDevice出现NullPointerException
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- 兔子-使用bmob的save()方法添加数据,出现NullPointerException
- Android使用HttpClient时出现的 java.lang.NullPointerException提示
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)
- 在Servlet使用getServletContext()获取ServletContext对象出现java.lang.NullPointerException(空指针)异常的解决办法