After updating my installation of android studio from 0.5.3 to 0.5.4 the project would throw this error as it launched.

I have updated the SDK via SDK Manager to get the new Android SDK Tools required for 0.5.4.

I have also updated the build tools in the gradle.build to use the newly updated versions.

I have deleted the androidpreview folder and restarted android studio to no avail.

I have also verified I have only 1 SDK on my system and that the paths to it are correct within Android studio.

Any suggestions greatly appreciated.

here is the Logcat output...

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 is caused when you have compiled against a different library than you are using at runtime. In runtime the error is thrown when the signature of the method isn't matching. Or when there's a compiler bug (a rare case though).

Check this line:

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

It seems like you're not using the same library you used in compile time.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top