【问题标题】:Android class GameHelper could not be found找不到 Android 类 GameHelper
【发布时间】:2014-08-19 16:47:30
【问题描述】:

每次我想启动我的应用程序时,我都会崩溃并出现以下异常:

06-28 23:15:08.474: E/dalvikvm(27890): Could not find class 'com.google.example.games.basegameutils.GameHelper', referenced from method com.example.sample.MainActivity.onCreate
06-28 23:15:08.704: E/AndroidRuntime(27890): FATAL EXCEPTION: main
06-28 23:15:08.704: E/AndroidRuntime(27890): java.lang.NoClassDefFoundError: com.google.example.games.basegameutils.GameHelper

我已经交换了 gen 和 src 文件夹(在 Properties>Java Build Path>Order and Export 中)。我在项目的属性中将 BaseGameUtils 引用为库项目,并将 BaseGameUtils(它引用了 google-play-services_lib)和 google-play-services_lib 也标记为库。有谁知道如何解决这个问题?

【问题讨论】:

    标签: android eclipse google-play-services android-library library-project


    【解决方案1】:

    我怀疑 BaseGameUtils 可能针对您尚未下载的 Android SDK 版本 或者您的项目检查中存在构建路径问题...属性...Java 构建路径...订购和导出...全选...确定

    这里给出了一些其他可能的原因:

    google play game service error -> 'Could not find class...GameHelper '

    祝你好运!

    【讨论】:

    • 我认为这个答案已被接受,但确切的解决方案是什么?如前所述,它是否在构建路径中?做了什么来解决它?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-14
    • 2015-04-13
    • 2014-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多