android – 资源条目ic_launcher已经定义

可以任何身体PLZ帮助他解决这个问题我想在我的 android工作室项目中使用这个库
https://github.com/daimajia/AndroidImageSlider

当我把它放在我的gradle文件中时它会显示这些错误@H_502_5@

@R_190_4045@ion:Gradle tasks [:app:generateDebugSources]
@R_190_4045@ion:res\drawable-mdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
@R_190_4045@ion:res\drawable-mdpi\ic_launcher.png:0: Originally defined here.
@R_190_4045@ion:res\drawable-xhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
@R_190_4045@ion:res\drawable-xhdpi\ic_launcher.png:0: Originally defined here.
@R_190_4045@ion:res\drawable-xxhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
@R_190_4045@ion:res\drawable-xxhdpi\ic_launcher.png:0: Originally defined here.
@R_190_4045@ion:1 error
@R_190_4045@ion:0 warnings
@R_190_4045@ion:See complete output in console
Error:Execution Failed for task ':app:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Users\Razi\AppData\Local\Android\android-studio\sdk\build-tools\19.1.0\aapt.exe package -f --no-crunch -I C:\Users\Razi\AppData\Local\Android\android-studio\sdk\platforms\android-19\android.jar -M C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\manifests\debug\AndroidManifest.xml -S C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\res\all\debug -A C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\assets\debug -m -J C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\source\r\debug -F C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\libs\app-debug.ap_ --debug-mode --custom-package com.ua.allahnames.app --output-text-symbols C:\Users\Razi\AndroidStudioProjects\AllahNames\app\build\symbols\debug
Error Code:
    1
Output:
    res\drawable-mdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
    res\drawable-mdpi\ic_launcher.png:0: Originally defined here.
    res\drawable-xhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
    res\drawable-xhdpi\ic_launcher.png:0: Originally defined here.
    res\drawable-xxhdpi-v4\ic_launcher.png:0: error: Resource entry ic_launcher is already defined.
    res\drawable-xxhdpi\ic_launcher.png:0: Originally defined here.

ic_launcher已定义!
可能是什么错误
我试图将构建工具更改为19.1.0,但我不认为这是一个问题?@H_502_5@

这是我的build.gradle代码@H_502_5@

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.daimajia.slider:library:1.0.1@aar'
    compile filetree(dir: 'libs',include: ['*.jar'])
}

解决方法

我是 this library的作者.很抱歉让你陷入困境.

您可以尝试一种解决方案:@H_502_5@

重命名ic_launcher(在你的项目中res / drawable-hdpi,res / drawable-mdpi,res / drawable-xhdpi,res / drawable-xxhdpi).@H_502_5@

只有当两个文件具有相同名称时才会出现此问题.@H_502_5@

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...