Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Timothy Boland
18,237 PointsRibbit | Recieving errors on the drawable images when building. Not sure how these are occuring
These errors are occuring whenever I build the app. Im re-walking through the "Implementing Designs for Android" course to see what I may be missing...but I dont think Im missing anything. Has anybody seen this?
/Ribbit/app/src/main/res/drawable-xxxhdpi/background_fill.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/Ribbit/app/src/main/res/drawable-hdpi/cab_background_bottom_ribbit.9.png
Error:Ticks in transparent frame must be black or red. - Found at pixel #8 along top edge.
Ticks in transparent frame must be black or red.
Found at pixel #20 along top edge.
/Ribbit/app/src/main/res/drawable-xxhdpi/background_fill.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/Ribbit/app/src/main/res/drawable-xhdpi/background_fill.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/Ribbit/app/src/main/res/drawable-hdpi/cab_background_top_ribbit.9.png
Error:Ticks in transparent frame must be black or red. - Found at pixel #8 along top edge.
/Ribbit/app/src/main/res/drawable-hdpi/btn_cab_done_focused_ribbit.9.png
Error:Ticks in transparent frame must be black or red. - Found at pixel #2 along top edge.
/Ribbit/app/src/main/res/drawable-mdpi/cab_background_top_ribbit.9.png
Error:Ticks in transparent frame must be black or red. - Found at pixel #8 along top edge.
Ticks in transparent frame must be black or red.
Found at pixel #2 along top edge.
/Ribbit/app/src/main/res/drawable-xxxhdpi/background.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
/Ribbit/app/src/main/res/drawable-mdpi/cab_background_bottom_ribbit.9.png
Error:Ticks in transparent frame must be black or red. - Found at pixel #8 along top edge.
Ticks in transparent frame must be black or red.
Found at pixel #20 along top edge.
Error:Failed to run command:
/sdk/build-tools/23.0.1/aapt s -i /Ribbit/app/src/main/res/drawable-hdpi/cab_background_bottom_ribbit.9.png -o /Ribbit/app/build/intermediates/res/debug/drawable-hdpi-v4/cab_background_bottom_ribbit.9.png
Error Code:
42
Output:
Error:9-patch image /Ribbit/app/src/main/res/drawable-hdpi/cab_background_bottom_ribbit.9.png malformed.
Ticks in transparent frame must be black or red.
Found at pixel #8 along top edge.
:app:mergeDebugResources FAILED
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: Failed to run command:
/sdk/build-tools/23.0.1/aapt s -i /Ribbit/app/src/main/res/drawable-hdpi/cab_background_bottom_ribbit.9.png -o /Ribbit/app/build/intermediates/res/debug/drawable-hdpi-v4/cab_background_bottom_ribbit.9.png
Error Code:
42
Output:
ERROR: 9-patch image /Ribbit/app/src/main/res/drawable-hdpi/cab_background_bottom_ribbit.9.png malformed.
Ticks in transparent frame must be black or red.
Found at pixel #8 along top edge.
1 Answer
Ben Deitch
Treehouse TeacherThis is the first I've seen it. Are there pixels in the frame (1 pixel border of the image) that aren't red or black? If there are, you could probably fix this by making those pixels transparent. Also, if you'd rather just move on than deal with modifying images it looks like you can change the file name from .9.png to .png and that will make the errors go away. The drawback would be that the image won't scale like a 9 patch anymore.
Also, during what video do you first get these errors? I'd love for you to be the last person to run into this issue :)
Timothy Boland
18,237 PointsTimothy Boland
18,237 PointsActually...Ive finished this project along time ago...It only happend recently when i decided to reopen it to update it to the latest android sdk and build tools to see if it works on a Marshmallow Emulator.
As far as I know there shouldnt be anything wrong with the images...so it may be a problem with how the latest sdk is handling these 9 patch images