I have got this Error while building gradle Error:Execution failed for task ':app:processDebugResources'. > No slave process to process jobs, aborting

孤街浪徒 提交于 2019-12-11 07:10:15

问题


I have got this Error while building grade

Error:Execution failed for task ':app:processDebugResources'. > No slave process to process jobs, aborting

Build.gradle

 apply plugin: 'com.android.application' android {
    compileSdkVersion 26
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "com.colorball.madness"
        minSdkVersion 14
        targetSdkVersion 26
        multiDexEnabled true
        ndk {
            moduleName "player_shared"
        }}
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        } } }dependencies {
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/dagger-1.2.2.jar')
    compile files('libs/javax.inject-1.jar')
    compile files('libs/nineoldandroids-2.4.0.jar')
    compile files('libs/PTAdRevMob.jar')
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:multidex:1.0.1'
    compile files('libs/support-v4-19.0.1.jar')}

回答1:


This thread was mentioned in No slave process to process jobs, aborting android studio 3.0.1 and I had exact same issue. (Error was not going in-spite of shrink=false, minify=false, invalidte cache).

Simple solution which solved the issue was close the android studio & relaunch it. Not sure why "invalidate cache & restart" failed. But seems that Android is becoming new MSWindows.. (I lost 1.5 hours in finding on forums & trying to fix the error.. Eventually it turned out to be a windows trick.)

Hope this age old trick will help somebody..




回答2:


Add shrinkResources true in your build.gradle and try to build.

buildTypes {
    release {
        shrinkResources true
  }
}



回答3:


In my case, I added compile fileTree(include: ['*.jar'], dir: 'libs') to my build.gradle(Module:app) and rebuild my project. Hope this helps!




回答4:


  • At first go to these setting in android studio (first pic)

  • and check (second pic) "Use embedded JDK (recommended)"

  • and also add shrinkResources true in your build.gradle .

    buildTypes { release { shrinkResources true }

    }
    

At last rebuild the project.



来源:https://stackoverflow.com/questions/48618738/no-slave-process-to-process-jobs-aborting-android-studio-3-0-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!