android – Execution failed for task :app:processDebugResources even with latest build tools

android – Execution failed for task :app:processDebugResources even with latest build tools

Issue SOLVED by making library and app build.gradle same … compileSdkVersion and buildToolsVersion.

library build.gradle and

android {

    compileSdkVersion 25
    buildToolsVersion 25.0.0
    .....
    .....
}

app build.gradle

android {

    compileSdkVersion 25
    buildToolsVersion 25.0.0
    .....
    .....
}

Set your compileSdkVersion to 23 in your modules build.gradle file.

android – Execution failed for task :app:processDebugResources even with latest build tools

Error:Execution failed for task com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:

finished with non-zero exit value 1

One reason for this error to occure is that the file path to a resource file is to long:

Error: File path too long on Windows, keep below 240 characters 

Fix: Move your project folder closer to the root of your disk

Dont:// folder/folder/folder/folder/very_long_folder_name/MyProject…

Do://folder/short_name/MyProject


Another reason could be duplicated resources or name spaces

Example:

  <style name=MyButton parent=android:Widget.Button>
      <item name=android:textColor>@color/accent_color</item>
      <item name=android:textColor>#000000</item>
  </style>

And make sure all file names and extensions are in lowercase

Wrong

myimage.PNG
myImage.png

Correct

my_image.png

Make sure to Clean/Rebuild project

(delete the build folder)

Leave a Reply

Your email address will not be published.