开发者

Android 3.1 VerifyError

I am running into a VerifyError after updating my Xoom to 3.1. Here is the code that seems to be causing it.

public boolean goBack()
{
        if(_overlay == null || _pdfView == null) ret开发者_C百科urn false;

        _overlay.removeView(_pdfView);
        _overlay = null;
        _pdfView = null;

        return true;
}

Where _overlay is a FrameLayout and _pdfView is a class for rendering PDF documents that extends RelativeLayout. Here is the error that I get.

05-17 11:26:30.532: WARN/dalvikvm(14244): VFY: Ljava/lang/Object; is not instance of Landroid/view/View;
05-17 11:26:30.532: WARN/dalvikvm(14244): VFY: bad arg 1 (into Landroid/view/View;)
05-17 11:26:30.532: WARN/dalvikvm(14244): VFY:  rejecting call to Landroid/view/ViewGroup;.removeView (Landroid/view/View;)V
05-17 11:26:30.532: WARN/dalvikvm(14244): VFY:  rejecting opcode 0x6e at 0x000f
05-17 11:26:30.532: WARN/dalvikvm(14244): VFY:  rejected Lcom/bluediesel/shell/utils/JavaScriptInterface;.goBack ()Z
05-17 11:26:30.532: WARN/dalvikvm(14244): Verifier rejected class Lcom/bluediesel/shell/utils/JavaScriptInterface;
05-17 11:26:30.532: DEBUG/AndroidRuntime(14244): Shutting down VM
05-17 11:26:30.532: WARN/dalvikvm(14244): threadid=1: thread exiting with uncaught exception (group=0x401e2760)
...
05-17 11:26:30.542: ERROR/AndroidRuntime(14244): Caused by: java.lang.VerifyError: com.bluediesel.shell.utils.JavaScriptInterface
05-17 11:26:30.542: ERROR/AndroidRuntime(14244):     at com.bluediesel.shell.utils.BDWebViewClient.<init>(BDWebViewClient.java:15)
05-17 11:26:30.542: ERROR/AndroidRuntime(14244):     at com.bluediesel.shell.view.BDWebView.<init>(BDWebView.java:56)
05-17 11:26:30.542: ERROR/AndroidRuntime(14244):     at com.bluediesel.shell.view.BDWebView.<init>(BDWebView.java:42)
05-17 11:26:30.542: ERROR/AndroidRuntime(14244):     ... 24 more

If I comment out the _overlay.removeView(_pdfView); line it works fine. It's like it doesn't know that PdfView is a subclass of View. PdfView is in a library. Could that have anything to do with it?


Opcode 0x6e is "invoke-virtual", used for method invocation. The message is being emitted by the code that validates the arguments being passed to the target method.

"Ljava/lang/Object; is not instance of Landroid/view/View;" suggests to me that a couple of types got merged, and the verifier couldn't find a common superclass below java.lang.Object. (If it were complaining that "PdfView is not an instance of View", then I'd agree with your assessment that the VM didn't understand the class relationships.)

Can you paste in the disassembly of goBack()? If you run "dexdump -d" on the APK it lives in and search for "com.bluediesel.shell.utils.JavaScriptInterface.goBack" you should jump right to it. Just include the (20-ish?) lines of disassembled bytecode for the method.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜