English 中文(简体)
甲型六氯环己烷的升级导致 j。 全权证书 失事
原标题:Upgrading Android SDK causes java.lang.VerifyError crash

自从提升我的安康基以来,我收到了一份<条码>java.lang.Verification Error坠毁的boot子,供我先前的工作使用。

查看这些记录,有一些导致坠机的新问题,以前没有:

Could not find method android.support.v4.content.LocalBroadcastManager.getInstance, referenced from method com.myapp.android.App.setOAuthLoginState
04-12 19:43:10.249: W/dalvikvm(9508): VFY: unable to resolve static method 251: Landroid/support/v4/content/LocalBroadcastManager;.getInstance (Landroid/content/Context;)Landroid/support/v4/content/LocalBroadcastManager;
04-12 19:43:10.249: D/dalvikvm(9508): VFY: replacing opcode 0x71 at 0x0014

android.support.v4.content. LocalBroadcastManager.getInstance 似乎仍然列入Andatibilty图书馆的源代码。 这一警告在我上诉之前被称作BTW。

我曾尝试过使用我的申请使用的“android-support-v4.jar的旧版本,以及最新的SDK中所列的“android-support-v4.jar的新版本,但这两种情况的结果相同(这似乎令人感兴趣?)。

同样,我们也是这样的警告:

W/dalvikvm(12455): VFY: unable to find class referenced in signature (Ltwitter4j/User;)

The twitter4j library referenced here appears to be included correctly in my project.

我仍然学习 Java,因此无法肯定可能产生这一问题。 任何帮助都将受到高度赞赏。

缩略语

04-12 19:43:07.585: W/ActivityThread(9508): Application com.myapp.android is waiting for the debugger on port 8100...
04-12 19:43:07.593: I/System.out(9508): Sending WAIT chunk
04-12 19:43:07.601: I/dalvikvm(9508): Debugger is active
04-12 19:43:07.796: I/System.out(9508): Debugger has connected
04-12 19:43:07.796: I/System.out(9508): waiting for debugger to settle...
04-12 19:43:10.007: I/System.out(9508): debugger has settled (1403)
04-12 19:43:10.249: I/dalvikvm(9508): Could not find method android.support.v4.content.LocalBroadcastManager.getInstance, referenced from method com.myapp.android.App.setOAuthLoginState
04-12 19:43:10.249: W/dalvikvm(9508): VFY: unable to resolve static method 251: Landroid/support/v4/content/LocalBroadcastManager;.getInstance (Landroid/content/Context;)Landroid/support/v4/content/LocalBroadcastManager;
04-12 19:43:10.249: D/dalvikvm(9508): VFY: replacing opcode 0x71 at 0x0014
04-12 19:43:10.265: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/Twitter;)
04-12 19:43:10.265: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/Twitter;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/User;)
04-12 19:43:10.272: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/Twitter;)
04-12 19:43:10.280: E/dalvikvm(9508): Could not find class  twitter4j.conf.ConfigurationBuilder , referenced from method org.tweetalib.twitter.TwitterManager.getAndConfigureTwitterInstance
04-12 19:43:10.280: W/dalvikvm(9508): VFY: unable to resolve new-instance 528 (Ltwitter4j/conf/ConfigurationBuilder;) in Lorg/tweetalib/twitter/TwitterManager;
04-12 19:43:10.280: D/dalvikvm(9508): VFY: replacing opcode 0x22 at 0x0013
04-12 19:43:10.288: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/auth/RequestToken;)
04-12 19:43:10.288: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/auth/RequestToken;)
04-12 19:43:10.296: W/dalvikvm(9508): VFY: unable to find class referenced in signature (Ltwitter4j/Twitter;)
04-12 19:43:10.296: I/dalvikvm(9508): Could not find method twitter4j.Twitter.getAccountSettings, referenced from method org.tweetalib.twitter.TwitterManager.isAuthenticated
04-12 19:43:10.296: W/dalvikvm(9508): VFY: unable to resolve interface method 2419: Ltwitter4j/Twitter;.getAccountSettings ()Ltwitter4j/AccountSettings;
04-12 19:43:10.296: D/dalvikvm(9508): VFY: replacing opcode 0x72 at 0x0008
04-12 19:43:10.296: W/dalvikvm(9508): VFY: unable to resolve exception class 519 (Ltwitter4j/TwitterException;)
04-12 19:43:10.296: W/dalvikvm(9508): VFY: unable to find exception handler at addr 0xd
04-12 19:43:10.296: W/dalvikvm(9508): VFY:  rejected Lorg/tweetalib/twitter/TwitterManager;.isAuthenticated ()Z
04-12 19:43:10.296: W/dalvikvm(9508): VFY:  rejecting opcode 0x0d at 0x000d
04-12 19:43:10.296: W/dalvikvm(9508): VFY:  rejected Lorg/tweetalib/twitter/TwitterManager;.isAuthenticated ()Z
04-12 19:43:10.296: W/dalvikvm(9508): Verifier rejected class Lorg/tweetalib/twitter/TwitterManager;
04-12 19:43:10.538: D/dalvikvm(9508): threadid=1: still suspended after undo (sc=1 dc=1)
04-12 19:43:16.780: D/AndroidRuntime(9508): Shutting down VM
04-12 19:43:16.780: W/dalvikvm(9508): threadid=1: thread exiting with uncaught exception (group=0x40a5a1f8)
04-12 19:43:16.804: E/AndroidRuntime(9508): FATAL EXCEPTION: main
04-12 19:43:16.804: E/AndroidRuntime(9508): java.lang.VerifyError: org/tweetalib/twitter/TwitterManager
04-12 19:43:16.804: E/AndroidRuntime(9508):     at com.myapp.android.App.onCreate(App.java:308)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3925)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.app.ActivityThread.access$1300(ActivityThread.java:122)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.os.Looper.loop(Looper.java:137)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at android.app.ActivityThread.main(ActivityThread.java:4340)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at java.lang.reflect.Method.invokeNative(Native Method)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at java.lang.reflect.Method.invoke(Method.java:511)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-12 19:43:16.804: E/AndroidRuntime(9508):     at dalvik.system.NativeStart.main(Native Method)
04-12 19:43:20.585: W/jdwp(9508): Debugger is telling the VM to exit with code=1
04-12 19:43:20.585: I/dalvikvm(9508): GC lifetime allocation: 10536 bytes
最佳回答

图书馆必须放在文件夹中(注:不适用)。

问题回答

图书馆必须放在<代码>/libs的夹上,not /lib!

解决这一问题的两种可能的解决办法

  1. Move all jar files from lib to libs
  2. 如果你使用安特,与保-一道建设,那么在保-档案中添加以下内容:

          -keep class android.support.** { *; }
          -dontnote android.support.**
          -dontwarn android.support.**
    




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签