gpt4 book ai didi

java - Android Studio 0.5.4 更新导致 Java.Lang.VerifyError

转载 作者:太空狗 更新时间:2023-10-29 13:24:33 32 4
gpt4 key购买 nike

将我安装的 android studio 从 0.5.3 更新到 0.5.4 后,项目会在启动时抛出此错误。

我已经通过 SDK 管理器更新了 SDK,以获得 0.5.4 所需的新 Android SDK 工具。

我还更新了 gradle.build 中的构建工具以使用新更新的版本。

我已经删除了androidpreview文件夹,重启android studio也没有用。

我还验证了我的系统上只有 1 个 SDK,并且它的路径在 Android studio 中是正确的。

非常感谢任何建议。

这是 Logcat 输出...

04-07 10:53:20.126    1656-1656/com.super8bit.singoffbetaversionone D/dalvikvm﹕ Not late-enabling CheckJNI (already on)
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ DexOpt: method is in an interface
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone I/dalvikvm﹕ Could not find method com.google.android.gms.common.api.GoogleApiClient.isConnected, referenced from method com.google.example.games.basegameutils.GameHelper.beginUserInitiatedSignIn
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ VFY: unable to resolve virtual method 9992: Lcom/google/android/gms/common/api/GoogleApiClient;.isConnected ()Z
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ VFY: rejecting opcode 0x6e at 0x0010
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ VFY: rejected Lcom/google/example/games/basegameutils/GameHelper;.beginUserInitiatedSignIn ()V
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ Verifier rejected class Lcom/google/example/games/basegameutils/GameHelper;
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone D/AndroidRuntime﹕ Shutting down VM
04-07 10:53:21.406 1656-1656/com.super8bit.singoffbetaversionone W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb3a80ba8)
04-07 10:53:21.506 1656-1656/com.super8bit.singoffbetaversionone E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.super8bit.singoffbetaversionone, PID: 1656
java.lang.VerifyError: com/google/example/games/basegameutils/GameHelper
at com.google.example.games.basegameutils.BaseGameActivity.getGameHelper(BaseGameActivity.java:93)
at com.google.example.games.basegameutils.BaseGameActivity.onCreate(BaseGameActivity.java:103)
at com.super8bit.singoffbetaversionone.Main.onCreate(Main.java:37)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

最佳答案

java.lang.VerifyError 是在您针对与您在运行时使用的库不同的库进行编译时引起的。在运行时,当方法的签名不匹配时会抛出错误。或者当存在编译器错误时(尽管这种情况很少见)。

检查这一行:

Could not find method com.google.android.gms.common.api.GoogleApiClient.isConnected, referenced........

看起来您使用的库与您在编译时使用的库不同。

关于java - Android Studio 0.5.4 更新导致 Java.Lang.VerifyError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22916116/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com