将我的android studio安装从0.5.3更新到0.5.4后,项目会在启动时抛出此错误。
我已通过SDK Manager更新了SDK,以获取0.5.4所需的新Android SDK工具。
我还更新了gradle.build中的构建工具以使用新更新的版本。
我删除了androidpreview文件夹并重启android studio无济于事。
我还验证了我的系统上只有一个SDK,并且在Android工作室中它的路径是正确的。
任何建议都非常感谢。
这是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)
答案 0 :(得分:2)
java.lang.VerifyError
。在运行时,当方法的签名不匹配时,将引发错误。或者当存在编译器错误时(尽管很少见)。
检查此行:
Could not find method com.google.android.gms.common.api.GoogleApiClient.isConnected, referenced........
您似乎没有使用编译时使用的相同库。