简体   繁体   English

任务执行失败':app:mergeDebugResources'

[英]Execution failed for task ':app:mergeDebugResources'

Error:Execution failed for task ':app:mergeDebugResources'. 错误:任务':app:mergeDebugResources'的执行失败。

Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: 错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:

GRADLE CONSOLE OUTPUT: GRADLE CONSOLE OUTPUT:

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2510Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72510Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42510Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2510Library UP-TO-DATE
:app:prepareComAndroidVolleyVolley100Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: 
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.
  • What went wrong: Execution failed for task ':app:mergeDebugResources'. 出了什么问题:任务执行失败':app:mergeDebugResources'。

    Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: 错误:java.util.concurrent.ExecutionException:com.android.ide.common.process.ProcessException:

  • Try: Run with --stacktrace option to get the stack trace. 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output. 使用--info或--debug选项运行以获取更多日志输出。

BUILD FAILED 建筑失败

Can anyone help me in fixing this. 任何人都可以帮我解决这个问题。 I am new to android :( 我是新来的android :(

I have added a screen shot of Android Manifest. 我添加了Android Manifest的屏幕截图。

So far I have tried below steps to fix the issue. 到目前为止,我已尝试以下步骤来解决此问题。 Still no help. 仍然没有帮助。
1) Clean Prjoect 1)清洁Prjoect
2) Rebuild Project 2)重建项目
3) File > Invalid Cache/Restart 3)文件>无效缓存/重启

build.gradle 的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.theaquarious.myfavapp"
        minSdkVersion 14
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.1.0'
    testCompile 'junit:junit:4.12'
    compile 'com.mcxiaoke.volley:library:1.0.19'
}

This issue is now resolved. 此问题现已解决。 The error was raised due to the image file. 由于图像文件引发了错误。 I have changed the extension of an JPG image to PNG without using any editor. 我已经将JPG图像的扩展名更改为PNG而不使用任何编辑器。 Due to this android studio started to throw the error. 由于这个android工作室开始抛出错误。 Thanks to everyone who tried to help me. 感谢所有试图帮助我的人。 If anyone needs more clarification on this, just comment. 如果有人需要对此进行更多说明,请发表评论。

This appears to be a bug in aquiring a lock in some Java thread. 这似乎是在某些Java线程中获取锁定时的错误。 I see this on my Windows 7 PC starting recently. 我最近在Windows 7 PC上看到了这一点。 I have had success by simply running Task Manager and then killing the java.exe process. 我通过简单地运行任务管理器然后杀死java.exe进程获得了成功。 If I then try again, the build seems to work fine. 如果我再试一次,构建似乎工作正常。

The error is because the names of the files that are saved in your Drawable folder can not be capitalized. 该错误是因为Drawable文件夹中保存的文件的名称无法大写。 Rename the file and leave everything in lowercase. 重命名文件并将所有内容保留为小写。

不要在大写情况下保存可绘制的图像,它应该是png而不是jpg否则会抛出错误:任务执行失败':app:mergeDebugResources'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 任务':app:mergeDebugResources'的执行失败。 > -1 - Execution failed for task ':app:mergeDebugResources'. > -1 错误:任务':app:mergeDebugResources'的执行失败。 > -1 - Error:Execution failed for task ':app:mergeDebugResources'. > -1 任务':app:mergeDebugResources'执行失败并生成错误 - Execution failed for task ':app:mergeDebugResources' & Build errors 如何修复任务执行失败':app:mergeDebugResources' - How to fix Execution failed for task ':app:mergeDebugResources' 任务':app:mergeDebugResources'的android studio执行失败 - android studio Execution failed for task ':app:mergeDebugResources' 任务 ':app:mergeDebugResources' 执行失败。 安卓工作室 - Execution failed for task ':app:mergeDebugResources'. Android studio Jenkins - 任务“:app:mergeDebugResources”执行失败 - Jenkins - Execution failed for task ':app:mergeDebugResources' Android - 错误:任务执行失败':app:mergeDebugResources' - Android - Error:Execution failed for task ':app:mergeDebugResources' 错误:任务':app:mergeDebugResources'的执行失败 - Error:Execution failed for task ':app:mergeDebugResources' 离子:任务“:app:mergeDebugResources”执行失败 - Ionic : Execution failed for task ':app:mergeDebugResources'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM