我在我的项目中使用 Google Play 游戏服务库(以及 BaseGameUtils)。当我从 Eclipse 启动它时,我的应用程序可以工作,但今天我将它导出为 apk,启动并得到一个 AbstractMethodError。我尝试使用 eclipse 和 ant 制作 apk,但结果相同。Eclipse-make 和 ant-make apk 在我在我的项目中添加(或开始使用)Google Play 游戏服务之前工作(它不是新的)。我该如何解决这个奇怪的问题?看起来 gms 代码与我的二进制文件不兼容?
堆栈跟踪:
java.lang.AbstractMethodError: abstract method not implemented
at com.google.android.gms.internal.be.onViewAttachedToWindow(Unknown Source)
at android.view.View.dispatchAttachedToWindow(View.java:11948)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2415)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2422)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2422)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1209)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1006)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4404)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
at android.view.Choreographer.doCallbacks(Choreographer.java:562)
at android.view.Choreographer.doFrame(Choreographer.java:532)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)