今天导入Android项目时提示错误:
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\and\asandsdk\sdk\build-tools\23.0.3\aapt.exe'' finished with non-zero exit value 1
然后一直百度,看到这么一条,引用包重复Android studio 面有了v4包或者v7包,这个时候在libs下又添加了一次包,就会报这个错误,删掉Libs下重复的包就行了。抱着尝试的心态,把红色的注释了,居然可以运行了,其实我也觉得奇怪,貌似依赖中没有跟这条一样的,有知道原因的欢迎评论
本文介绍了解决Android项目中因重复引用导致的资源冲突问题。当Android Studio项目中同时使用了v4或v7包,并在libs目录下再次引入相同包时,可能会出现资源找不到的错误。文章提供了一个简单的解决方案,即删除libs目录下重复的包。

4万+

被折叠的 条评论
为什么被折叠?



