在添加ButterKnife的时候,根据它的Readme配置以后报错:

Error:(2, 0) Cannot add extension with name 'android', as there is an extension already registered with that name.

解决方法如下:

默认我们在自己的module下添加后是这样的:

apply plugin: 'com.android.application'
apply plugin: 'com.android.library'
apply plugin: 'com.jakewharton.butterknife'

此时,我们只需要删掉

apply plugin: 'com.android.library'

这一行就行了,因为它跟com.android.application冲突了。

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对脚本之家的支持。如果你想了解更多相关内容请查看下面相关链接

更多相关文章

  1. Android(安卓)适配器Adapter的学习
  2. android Application学习之二
  3. Android中添加和识别手势操作
  4. Android动画学习笔记-Android(安卓)Animation
  5. android 学习笔记 - 1 环境搭建
  6. android NDK学习篇3之two-libs——使用(多个)静态库生成动态库
  7. maven 学习笔记(二)-创建简单的eclipse+android+maven工程
  8. android菜鸟学习笔记15----Android(安卓)Junit测试
  9. 《Android学习指南》目录

随机推荐

  1. Android(安卓)widget桌面插件
  2. Android中EditText属性
  3. Android基于位置的服务LBS
  4. android 对话提示框大全
  5. 改变button按钮的形状
  6. 一个网友写的android开发随笔,不错,可以参
  7. 阻止一进入页面就弹输入法对话框的方法
  8. Android中通过Intent 调用图片、视频、音
  9. Android摄像头--通过Intent启动
  10. android GridView选择照片的完整实现