在我们的库模块中,我们的资源文件很可能与支持库文件同名:例如abc_list_focused_holo.9.png(这不是我的决定而且我不允许重命名它。)< / p>
现在,我正在尝试添加Goole Play Service。所以我添加了
compile 'com.google.android.gms:play-services:7.5.0'
我收到了这个错误:
:Bad-Project:processReleaseResourcesC:\Bad-Project\build\intermediates\res\release\drawable-hdpi-v4\abc_list_focused_holo.9.png: error: Duplicate file.
C:\Bad-Project\build\intermediates\res\release\drawable-hdpi\abc_list_focused_holo.9.png: Original is here. The version qualifier may be implied.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Bad-Project:processReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\xxx\AppData\Local\Android\sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1
我尝试过添加
packagingOptions {
pickFirst 'res/drawable-hdpi-v4/abc_list_focused_holo.9.png'
pickFirst 'res/drawable-hdpi/abc_list_focused_holo.9.png'
}
还
packagingOptions {
exclude 'res/drawable-hdpi-v4/abc_list_focused_holo.9.png'
exclude 'res/drawable-hdpi/abc_list_focused_holo.9.png'
}
然而,他们没有工作。我仍然有同样的错误。 知道如何解决这个问题?
由于