Libpng error in: app: mergeDebugResources - Gradle Error 42

When compiling my debugging application in Android Studio, I get the following errors:

Failed to run command: C:\Users\Farbod\Android-SDK\build-tools\21.1.2\aapt.exe s -i C:\Users\Farbod\AndroidStudioProjects\MyApp\app\src\main\res\drawable-hdpi\img_myImage.png -o C:\Users\Me\AndroidStudioProjects\MyApp\app\build\intermediates\res\debug\drawable-hdpi-v4\img_myImage.png Error Code: 42 Output: C:\Users\Me\AndroidStudioProjects\MyApp\app\src\main\res\drawable-hdpi\img_myImage.png: libpng warning: IDAT: Too many IDATs found libpng error: Read Error :app:mergeDebugResrouces FAILED 

I checked that all my files are in .png format, and I'm not sure what might be wrong.

+5
source share
1 answer

Decision

I tried to open my file ( img_myImage.png ) in Adobe Fireworks, which would not open the file, so I opened it in Photoshop, which worked, and then I re-saved it as a .png file, which seemed to solve the problem.

+4
source

Source: https://habr.com/ru/post/1213531/


All Articles