I'm trying to work with a 9patch image format but I get this error when I try to build the app:
AAPT: error: file failed to compile
Any reasons why this could happen?
I'm trying to work with a 9patch image format but I get this error when I try to build the app:
AAPT: error: file failed to compile
Any reasons why this could happen?
The reason that the 9patch failed to compile was 9patch bad format - the 9patch indicating pixels wasn't fully black (#000000) but some of them was grey, fixing those pixels to pure black fixed the problem
Having opened the 9patch in an image editor while editing it at the same time in Android Studio can also cause this error, I guess its since AS can't write the 9patch file when compiling.
For me this was because the top-left pixel was black instead of transparent.
© 2022 - 2024 — McMap. All rights reserved.