I have this error when trying to make a module of a project
apply plugin: \'com.android.library\' android { compileSdkVersion 17 buildToolsVersion \
It may happens because fake png files. You can use this command to check out fake pngs.
cd && find . -name *.png | xargs pngcheck
And then,use ImageEditor(Ex, Pinta) to open fake pngs and re-save them to png.
Good luck.