3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

9-patch image xx.9.png malformed. エラー

Posted at

メモ

動作環境:Android Studio 2.0 Preview 3

#9patchを入れたらエラー
画像を入れてRunもしくはClean Projectするとエラーが出た

:app:mergeDebugResources
AAPT err(Facade for 804541x78) : No Delegate set : lost message:ERROR: 9-patch image /path/app/src/main/res/drawable/button_radius_left_blue_small.9.png malformed.
AAPT err(Facade for 804541x78) : No Delegate set : lost message:       Frame pixels must be either solid or transparent (not intermediate alphas).
AAPT err(Facade for 804541x78) : No Delegate set : lost message:       Found at pixel #1 along right edge.

端1pxが透明(transparent)じゃないですよエラー。

button_radius_left_blue_small.9.pngが該当の9patch画像。
sdk/tools/draw9patchを使って作っていればこうはならないはずだが、9patch画像って結局端っこ1pxを塗りつぶした画像だろ、と思ってphotoshopでリサイズしたりしていたらエラー出た。
結局リサイズしてから再度draw9patchで書き出したら直った

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?