【问题标题】:Execution failed for task ':app:mergeDebugResources'任务“:app:mergeDebugResources”执行失败
【发布时间】:2017-01-30 07:44:04
【问题描述】:

错误:任务 ':app:mergeDebugResources' 执行失败。

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

GRADLE 控制台输出:

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.
  • 出了什么问题: 任务 ':app:mergeDebugResources' 执行失败。

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

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。

构建失败

谁能帮我解决这个问题。我是安卓新手 :(

I have added a screen shot of Android Manifest.

到目前为止,我已经尝试了以下步骤来解决这个问题。仍然没有帮助。
1) 清洁项目
2) 重建项目
3) 文件 > 无效缓存/重启

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'
}

【问题讨论】:

  • 请添加您的应用build.gradle
  • 我已经添加了 build.gradle
  • 您使用了已弃用的 volley 库。尝试使用compile 'com.android.volley:volley:1.0.0'
  • 顺便说一句,build.gradle 是你的完整版本吗?如果只使用 3-4 个库,则不需要启用 multidex。因此,您可以使用 multiDexEnabled false 将 multidex 设置为 false
  • 我用了compile 'com.android.volley:volley:1.0.0',还是没有帮助

标签: android


【解决方案1】:

此问题现已解决。由于图像文件而引发了错误。我在不使用任何编辑器的情况下将 JPG 图像的扩展名更改为 PNG。由于这个android studio开始抛出错误。感谢所有试图帮助我的人。如果有人需要对此进行更多说明,请发表评论。

【讨论】:

  • 我面临同样的问题。它没有解决。我没有对任何可绘制对象进行任何更改。
【解决方案2】:

这似乎是在某些 Java 线程中获取锁定的错误。我最近在我的 Windows 7 PC 上看到了这一点。我通过简单地运行任务管理器然后终止 java.exe 进程就取得了成功。如果我再试一次,构建似乎工作正常。

【讨论】:

    【解决方案3】:

    这个错误是因为你的 Drawable 文件夹中保存的文件名不能大写。重命名文件并将所有内容保留为小写。

    【讨论】:

      【解决方案4】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-08-25
        • 1970-01-01
        • 1970-01-01
        • 2017-11-09
        • 1970-01-01
        • 1970-01-01
        • 2019-10-10
        相关资源
        最近更新 更多