Cannot add extension with name 'android'......
16lz
2021-01-23
在添加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冲突了。
更多相关文章
- MPAndroidChart项目实战(六)——自定义1MPAndroidChart滑动冲突解
- android studio gradle编译时的jar冲突错误
- Android Build 异常 -android.support.VERSION 冲突
- andriod item内checked的setOnClickListener事件和setOnItemClic
- Android滑动冲突二内部拦截法详情
- Unity 对接 Android 打包编译 bug 总结之 android.support.v4 和
- android:maxLines与android:ellipsize冲突
- Android版本问题 版本冲突
- checkbox 与listview 点击事件冲突