OpticalBound #89

Closed
rurodriguez opened this Issue Mar 20, 2014 · 11 comments

Projects

None yet

4 participants

@rurodriguez

It would be interesting to remove "Optical Bounds" for versions prior to 4.3

@writtmeyer

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.

@JavierSP1209

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?

@rurodriguez

Remove "OpticalBounds" (the red lines of the png) from all your ninepatchs

@JavierSP1209

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.

@rurodriguez

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.

@writtmeyer

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).

@JavierSP1209

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

@rurodriguez

+1 JavierSP1209
I agree, i think the old PNG cruncher solution is better. Thanks for sharing!

@writtmeyer

Thanks, Javier. Works fine now. I think this issue can be closed.

@jeromevdl
Owner

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 !

@jeromevdl jeromevdl closed this Mar 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment