android添加butterknife报错解决方法 Android添加ButterKnife时报错Error:(2, 0) Cannot add extension with name '

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

android添加butterknife报错解决方法 Android添加ButterKnife时报错Error:(2, 0) Cannot add extension with name '

franksight   2021-03-30 我要评论

在添加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冲突了。

总结

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

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们