开发者

Proper backwards compatability, java.lang.VerifyError

I'm having trouble getting my app to work properly on older devices.

I've ready the "Backward Compatibility" tutorial, I'm working for performance - and it suggestions using .invoke is considerably slower than using a wrapper class.

But it seems the wrapper class only works for if a class is not available on older devices.

I'm compiling with 2.2, but minSDK is 1.5

I'm working with multitouch, I assumed that if I checked against Build.Version.SDK, and didn't call getPoin开发者_运维技巧terCount() - then it wouldn't raise an error.

But when I create an instance of the class which has my methods in, I get this:

06-29 08:17:28.263: ERROR/dalvikvm(255): Could not find method android.view.MotionEvent.getPointerCount, referenced from method com.myPackage.myClass

Despite not actually calling it. Is this normal?

How do I get around this?


Sorted it, using a wrapper class - but in a different way.

Was attempting to not create new objects on every touch event, I have one wrapper class and pass MotionEvent to that each time. Doesn't remove anything noticeable to frame rate

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜