Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Found pixel at #" error #82

Closed
kckunal2612 opened this issue Dec 2, 2015 · 7 comments
Closed

"Found pixel at #" error #82

kckunal2612 opened this issue Dec 2, 2015 · 7 comments
Labels

Comments

@kckunal2612
Copy link

I am using Android Studio 1.5, with the build tools version 23.0.2, and am getting a Gradle Build Error for every 9-patch image that I use (using your tool).
Here is the complete error message from GradleBuild Log -

AAPT: ERROR: 9-patch image /home/kunal/AndroidStudioProjects/MyApplication/app/src/main/res/drawable-hdpi/munchery_ondemand.9.png malformed.

AAPT: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT: Found at pixel #360 along bottom edge.
AAPT: ERROR: 9-patch image /home/kunal/AndroidStudioProjects/MyApplication/app/src/main/res/drawable-xhdpi/munchery_ondemand.9.png malformed.
AAPT: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT: Found at pixel #480 along bottom edge.
AAPT err(Facade for 1648474378) : No Delegate set : lost message:ERROR: 9-patch image /home/kunal/AndroidStudioProjects/MyApplication/app/src/main/res/drawable-xxxhdpi/munchery_ondemand.9.png malformed.
AAPT err(Facade for 1648474378) : No Delegate set : lost message: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 1648474378) : No Delegate set : lost message: Found at pixel #959 along top edge.
:app:mergeDebugResources FAILED
Error:Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
Information:BUILD FAILED

@mukesh4u
Copy link

mukesh4u commented Jun 7, 2016

Add below line inside build.gradle
aaptOptions.setProperty("cruncherEnabled", false)

@dandar3
Copy link

dandar3 commented Jun 28, 2016

Same problem here with drawables generated by Simple Nine-patch Generator.
Oddly enough the issue only happens for xhdpi, xxhdpi, xxxhdpi (?!)

Android Studio 2.1.2
Android Plugin for Gradle 2.1.2
Build Tools 24.0.0

Executing task ':app:mergeDebugResources' (up-to-date check took 0.078 secs) due to:
  Input file R:\Workspaces\Android\[...]\app\src\main\res\drawable-xhdpi\ic_logo_splash.9.png has been added.
  Input file R:\Workspaces\Android\[...]\app\src\main\res\drawable-xxxhdpi\ic_logo_splash.9.png has been added.
  Input file R:\Workspaces\Android\[...]\app\src\main\res\drawable-mdpi\ic_logo_splash.9.png has been added.
QueuedCruncher is using D:\Android\android-sdk\build-tools\24.0.0\aapt.exe

AAPT err(Facade for 193471613): ERROR: 9-patch image R:\Workspaces\Android\[...]\app\src\main\res\drawable-xhdpi\ic_logo_splash.9.png malformed.
AAPT err(Facade for 193471613):        Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 193471613):        Found at pixel #284 along bottom edge.
AAPT err(Facade for 193471613): ERROR: 9-patch image R:\Workspaces\Android\[...]\app\src\main\res\drawable-xxxhdpi\ic_logo_splash.9.png malformed.
AAPT err(Facade for 193471613):        Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 193471613):        Found at pixel #287 along bottom edge.
AAPT err(Facade for 96010134): ERROR: 9-patch image R:\Workspaces\Android\[...]\app\src\main\res\drawable-xxhdpi\ic_logo_splash.9.png malformed.
AAPT err(Facade for 96010134):        Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 96010134):        Found at pixel #504 along right edge.

:app:mergeDebugResources FAILED

Setting AAPT cruncherEnabled to false doesn't seem to have an effect for me.

@dandar3
Copy link

dandar3 commented Jun 28, 2016

@mukesh4u
FYI It appears AAPT cruncher setting applies to non-9patch only, see below:
https://medium.com/@duhroach/smaller-pngs-and-android-s-aapt-tool-4ce38a24019d#.647noh4n1

aaptOptions {
 cruncherEnabled = false
}

This will turn off the AAPT png optimization for non-9patch PNG files inside of your APK (I haven’t figured out what it does with 9Patches yet…)

@romannurik romannurik added the bug label Jan 17, 2017
@romannurik
Copy link
Owner

Please re-open if this is still a problem (and attach an example file that's causing the errors); I'm not seeing any errors.

@bulatgaleev
Copy link

bulatgaleev commented Jul 24, 2017

AAPT: ERROR: 9-patch image app/src/main/res/drawable-xhdpi/img_offer_bg.9.png malformed.
AAPT: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT: Found at pixel #369 along top edge.
AAPT: ERROR: 9-patch image app/src/main/res/drawable-xxhdpi/img_offer_bg.9.png malformed.
AAPT: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT: Found at pixel #535 along left edge.
AAPT: ERROR: 9-patch image app/src/main/res/drawable-mdpi/img_offer_bg.9.png malformed.
AAPT: Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT: Found at pixel #179 along left edge.
Error: Some file crunching failed, see logs for details

@romannurik Having same error.
mdpi image from logs

UPD. Problem solved by opening image in build-in Android Studio 9patch editor, making slight change and save, then revert this change and save again.

@rtuck99
Copy link

rtuck99 commented Aug 16, 2017

This is indeed a bug with Android Asset Studio. Import the attached xxxhdpi source file, set regions and then export and get the attached zip. The xxxhdpi file produces the error:

AAPT err(Facade for 1513812613) : No Delegate set : lost message:ERROR: 9-patch image /home/bob/workspace/cards/cards-android/app/src/main/res/drawable-xxxhdpi/medium_button.9.png malformed.
AAPT err(Facade for 1513812613): Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 1513812613): Found at pixel #125 along top edge.

Inspect pixel 125 and you will see it indeed has alpha 0x07

medium_button
medium_button.9 (7).zip

@romannurik
Copy link
Owner

Should be fixed by a4ddd69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants