Exception because getCallback() is Honeycomb API #14

pboos opened this Issue Mar 12, 2013 · 2 comments


None yet

2 participants

pboos commented Mar 12, 2013


This line fails with:

E/AndroidRuntime( 2918): java.lang.NoSuchMethodError: uk.co.senab.bitmapcache.CacheableBitmapDrawable.getCallback
E/AndroidRuntime( 2918):    at uk.co.senab.bitmapcache.CacheableBitmapDrawable.checkCallback(CacheableBitmapDrawable.java:167)
E/AndroidRuntime( 2918):    at uk.co.senab.bitmapcache.CacheableBitmapDrawable.draw(CacheableBitmapDrawable.java:66)
E/AndroidRuntime( 2918):    at android.widget.ImageView.onDraw(ImageView.java:872)
E/AndroidRuntime( 2918):    at android.view.View.draw(View.java:6902)

I guess you will have to intercept the setCallback method and store the callback yourself. Too bad setCallback is API 1 and getCallback is API 11. Confusing mistake by google.

Btw. You do not run lint to check against such errors?


@pboos: I've started using IntelliJ, hence the lack of obvious Lint. It's still my fault for not testing on a Gingerbread device like I usually do.

pboos commented Mar 12, 2013

@chrisbanes That is what I guessed. I switched to IntelliJ as well. Got lint running through maven, but have it reporting some TargetApi mistakes, even though I added @TargetApi correctly. Might be because of scala though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment