0

刚刚在 Android 开发控制台上收到以下崩溃报告,但它没有命中我的代码,并且报告没有显示 Android 版本:

检查 4.1.x 和 4.0.x 的源代码,第 345 行是这个,length() 在接口中定义:return getText().length();

这怎么可能真的不见了?我假设我在某些东西上使用了 setText() 并且它不好,但是我是否进行调查,虽然我不知道它实际发生在哪里!?

java.lang.IncompatibleClassChangeError: interface not implemented
at android.text.BoringLayout.getLineStart(BoringLayout.java:345)
at android.text.Layout.drawText(Layout.java:229)
at android.text.Layout.draw(Layout.java:205)
at android.text.BoringLayout.draw(BoringLayout.java:400)
at android.widget.TextView.onDraw(TextView.java:4886)
at android.view.View.draw(View.java:13470)
at android.view.View.draw(View.java:13354)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13575)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at android.widget.ScrollView.draw(ScrollView.java:1569)
at android.view.View.draw(View.java:13354)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13352)
at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
at android.view.View.draw(View.java:13473)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2185)
at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2258)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2153)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4899)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:558)
at dalvik.system.NativeStart.main(Native Method)
4

1 回答 1

0

这可能是由于 android.text.BoringLayout 所属的库发生了变化。可能是类实现的接口更改了它的方法签名或添加了新方法或更改了它的可访问权限(公共保护私有)。

可能发生这种情况的设备可能正在托管由独立用户开发的自定义 rom,这些自定义 rom 具有不同的定义,这些定义赋予了 BinaryLayout 实现的接口之一或其超类之一。

向后二进制兼容性案例

于 2013-08-19T10:53:33.143 回答