您的位置:首页 > 其它

向每一个错误致敬——导入第三方库遇到的坑

2016-01-10 16:51 1006 查看

导入第三方库遇到的坑

今天在Github上找了个好玩儿的库,想拿过来看看。结果在导入该库的时候,一直出错。最终搞定了!

该库地址:

FloatingGroupExpandableListView

这个库可以做到:Android中的二级列表加头并且在滑动的过程中每一个组列表可以悬浮在最上面。



如该库介绍的那样:

FloatingGroupExpandableListView is a huge name an open source Android library that provides a floating group view (aka anchored / pinned / sticky section header) at the top of the ExpandableListView. This lib is based on Emil Sjölander’s StickyListHeaders.

FloatingGroupExpandableListView 是一个开源的Android库项目它提供了一个可以悬浮的组View在ExpandableListView上。这个库基于 Emil Sjölander的 StickyListHeaders

在下载下来使用的过程中碰到的问题:

Error:(1, 0) Your project contains 2 or more modules with the same identification com.diegocarloslima:FloatingGroupExpandableListView

at “:” and “:FloatingGroupExpandableListView”.

You must use different identification (either name or group) for each modules.

Open File

后来在StackOverflow上找到了解决方案:

Your project contains 2 or more modules with the same identification com.salesforce.android:AndroidCommon at “:AndroidCommon” and “:AndroidCommon:AndroidCommon”. You must use different identification (either name or group) for each modules.

解决方案:

This kind of error happens in these cases:

2 modules have the same identification (group+name).

1 module has the same name of the root project

In the first case:

rename one of the modules

update the settings.gradle file with the new name

run gradlew clean assemble

In the second case:

rename the root project or follow the steps above.

问题原因:

该项目中有两个module名字一样了

其中的一个module和该工程的根目录有同样的名字

解决步骤:

重命名其中的一个module并且更新settings.gradle文件,运行gradlew clean 清理工程

重命名工程的根目录跟上面一样的步骤。

这样,最终把这个库跑了起来。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: