Error: Execution failed for task ': app: mergeDebugResources'

3

This error came up all of a sudden, it marks me the class R in red in the Java code.

AAPT err (Facade for 557143976): libpng error: Not a PNG file

  

Error: Execution failed for task ': app: mergeDebugResources'.
  Some file crunching failed, see logs for details

I've already used Rebuild Project and Clean Project several times ...

    
asked by Parzival 25.05.2016 в 20:25
source

1 answer

2

This detail can not be resolved with: Build > Rebuild Project .

I suggest you update the gradle version !, in my case I use:

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
}

The problem may also be due to some problem in the resources, for example if you changed the extension of image files from .jpg to .png Android Studio detects that it is not really a resource with .png format, for that reason it can mark error.

What you have to do in this case is open the .jpg file with some program to manipulate images and save it with .png format

    
answered by 25.05.2016 / 21:29
source