It would be interesting to remove "Optical Bounds" for versions prior to 4.3
Yes. I agree. It actually crashes on some versions Gingerbread and 2.2. So I think it would be necessary to create separate v18 folders. Which means that you probably also have to add >= 18 and < 18 as another option on the editing page.
I have this problem too, but the rare thing about it is that yesterday it works fine, but now crashes on 2.2. Any work around besides creating separate v18 folder?
Remove "OpticalBounds" (the red lines of the png) from all your ninepatchs
Yes I know, but this will be a lot of work and its not the best way, it would be better creating v18 folder and remove optical bounds only for prior versions.
Optical Bounds Ninepatchs will crash in any version prior to 4.3 (as far as I know, there is no backward compatibility), so you can create a v18 folder or remove the Optical Bounds. I cannot think of anything more reasonable.
Optical bounds are not supported prior to 4.3 but it looks like they do not cause crashes everywhere. On 4.1 those bounds simply seem to be ignored without causing any trouble. I will test later on with a kindle device (should be older as well).
I think i found a better work around, first I've found this issue report: https://code.google.com/p/android/issues/detail?id=67376
In this you can see that using gradle plug-in 0.9.1 makes PNG crash on GB and it states that the work around is use 0.9.0 instead. But that not nice either, in the release notes of 0.9.1 the android team states that you should use the old PNG cruncher: http://tools.android.com/tech-docs/new-build-system
I have test both solutions and both are OK, i thing the second one is better, its your choice
I agree, i think the old PNG cruncher solution is better. Thanks for sharing!
Thanks, Javier. Works fine now. I think this issue can be closed.
I better understand now. Because I had tested the generated assets on froyo and GB and did not experiment any problem. But I was with a 0.7.+ version of gradle build...
Probably the best solution is to create a v18 folder but it will add many more assets, and it gives me more work :p.
I think I will add a new entry in the faq to explain how to solve the problem... and if really necessary, I'll do the v18 folder....
Thanks @JavierSP1209 !