liaoinstan / SpringView

🔥 A custom view pull to refresh,support ScrollView,ListView,RecyclerView,WebView and all another views, easy to use
Apache License 2.0
1.93k stars 355 forks source link

把aar包集成到项目中报和V7包中资源冲突 #81

Open chinapengwei opened 6 years ago

chinapengwei commented 6 years ago

在我的工程中build.gradle中引入'com.liaoinstan.springview:library:1.5.0',报“Attribute "type" already defined with incompatible format. Message{kind=ERROR, text=Attribute "type" already defined with incompatible format., sources=[C:\Users\chinapengwei.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.0.aar\a4e06ca6855feb60902ac8ff1dc8a097\res\values\values.xml:251:5-69], original message=, tool name=Optional.of(AAPT)}”,是资源冲突了。我在代码中找过,在代码中没有找到。我单独生成一个工程引入包则没有问题,应该是引用的第三方包造成的。请问有什么办法解决。

liaoinstan commented 6 years ago

SpringView 的自定义属性里已经定义了"type"这个属性了,你的工程中或者引入的其他自定义View也包含了同名属性

chinapengwei commented 6 years ago

我知道原因,但不知道如何去除这种资源重复的冲突,我的工程中引用了很多第三方库,不知道和那个库有冲突,最后没办法只能拷代码到工程中,好在你的代码不多,比较好移植。