在添加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. MPAndroidChart项目实战(六)——自定义1MPAndroidChart滑动冲突解
  2. android studio gradle编译时的jar冲突错误
  3. Android Build 异常 -android.support.VERSION 冲突
  4. andriod item内checked的setOnClickListener事件和setOnItemClic
  5. Android滑动冲突二内部拦截法详情
  6. Unity 对接 Android 打包编译 bug 总结之 android.support.v4 和
  7. android:maxLines与android:ellipsize冲突
  8. Android版本问题 版本冲突
  9. checkbox 与listview 点击事件冲突

随机推荐

  1. 干掉Navicat!MySQL官方客户端到底行不行?
  2. PMP考试个人感想
  3. Elasticsearch官方已支持SQL查询,用起来贼
  4. 解放双手!MyBatis官方代码生成工具给力!
  5. 还在使用第三方Docker插件?SpringBoot官方
  6. 当Swagger遇上YApi,瞬间高大上了!
  7. Lombok有啥牛皮的?SpringBoot和IDEA官方都
  8. 干掉mapper.xml!MyBatis新特性动态SQL真香
  9. MyBatis 的 四 个妙用
  10. 数据库迁移搞炸了!没用这款开源神器的锅?