我要编译一个项目,我得到了错误:摇篮:执行失败的任务:应用程序:processDebugResources。
I want to compile a project, I got Error:Gradle: Execution failed for task ':app:processDebugResources'.
下面是个例外:
错误:摇篮:执行失败的任务:应用程序:processDebugResources。 com.android.ide.common.internal.LoggedErrorException:无法运行命令:
Error:Gradle: Execution failed for task ':app:processDebugResources'. com.android.ide.common.internal.LoggedErrorException: Failed to run command:
D:\ devtools \ ADT \ SDK \集结工具\ 21.1.1 \ aapt.exe包-f --no-紧缩-ID:\ devtools \ ADT \ SDK \平台\ Android为21 \的android.jar -ME:\ code \机器人\ TVMediaPlayer \程序\建立\清单\调试\ AndroidManifest.xml中-SE:\ code \机器人\ TVMediaPlayer \程序\建立\水库\所有\调试-AE:\ code \机器人\ TVMediaPlayer \程序\建立\资产\调试-m -JE:\ code \机器人\ TVMediaPlayer \程序\建立\来源\ r \调试-FE:\ code \机器人\ TVMediaPlayer \程序\建立\库\ APP-debug.ap_ --debug模式--custom包com.skyworth.tvmediaplayer.app - 输出 - 文本符号E:\ code \机器人\ TVMediaPlayer \应用程序\编译\符号\调试
D:\devtools\adt\sdk\build-tools\21.1.1\aapt.exe package -f --no-crunch -I D:\devtools\adt\sdk\platforms\android-21\android.jar -M E:\code\android\TVMediaPlayer\app\build\manifests\debug\AndroidManifest.xml -S E:\code\android\TVMediaPlayer\app\build\res\all\debug -A E:\code\android\TVMediaPlayer\app\build\assets\debug -m -J E:\code\android\TVMediaPlayer\app\build\source\r\debug -F E:\code\android\TVMediaPlayer\app\build\libs\app-debug.ap_ --debug-mode --custom-package com.skyworth.tvmediaplayer.app --output-text-symbols E:\code\android\TVMediaPlayer\app\build\symbols\debug
错误code: 1
Error Code: 1
输出: E:\ code \机器人\ TVMediaPlayer \程序\建立\水库\所有\调试\绘制-HDPI-V4 \ ic_launcher.png:错误:重复的文件。 E:\ code \机器人\ TVMediaPlayer \程序\建立\水库\所有\调试\绘制,华电国际\ ic_launcher.png:原来是在这里。该版本限定符可能暗示。
Output: E:\code\android\TVMediaPlayer\app\build\res\all\debug\drawable-hdpi-v4\ic_launcher.png: error: Duplicate file. E:\code\android\TVMediaPlayer\app\build\res\all\debug\drawable-hdpi\ic_launcher.png: Original is here. The version qualifier may be implied.
这里的摇篮文件:
android {
compileSdkVersion 21
buildToolsVersion "21.0.2"
defaultConfig {
applicationId "com.jerrellmardis.amphitheatre"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
renderscriptTargetApi 19
buildConfigField "String", "TMDB_API_KEY", "\"${loadSecret("TMDB_API_KEY")}\""
}
......
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:leanback-v17:21.0.0'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:palette-v7:21.0.0'
compile 'com.squareup.picasso:picasso:2.3.4'
compile 'com.squareup.retrofit:retrofit:1.7.1'
compile 'com.google.code.gson:gson:2.3'
compile 'org.apache.commons:commons-lang3:3.3.2'
compile 'org.apache.commons:commons-collections4:4.0'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.github.satyan:sugar:1.3'
}
我疑惑的错误信息,我是把错误的PNG文件或我的摇篮配置文件是错误的?
I am puzzled about the error message, am I put the wrong png file or my gradle config file is wrong?
我在使用第三方库有同样的问题。
I had the same problem while using a third party library.
要解决这个问题,让我感动的绘制文件夹我ic_launcher.png文件MIPMAP文件夹。而问题就解决了。
To solve it, I moved my ic_launcher.png files from drawable folder to mipmap folder. And problem solved.
上一篇:如何使一个条件invalidateOptionsMenu()调用取决于Android的API级别?级别、条件、Android、invalidateOptionsMenu
下一篇:错误:ANDROID_HOME未设置和"机器人"命令不在PATH。必须满足这些条件中的至少一个机器人、命令、错误、条件