我正在使用 AndEngine-GLES2-AnchorCenter,我想实现 Google Play 游戏服务。
我从(Google Play 游戏服务的一部分 - Android 示例)复制BaseGameActivity
和GameHelper
类到我在同一个包中的项目。BaseGameUtils
util
因为 AndEngine 已经使用了BaseGameActivity
,所以我将它重命名为GBaseGameActivity
并将扩展类更改为 BaseGameActivity(AndEngine 类),所以从这里:
public abstract class BaseGameActivity extends FragmentActivity
至:
public abstract class GBaseGameActivity extends BaseGameActivity
然后我扩展了我的课程GBaseGameActivity
(当我扩展 BaseGameActivity(AndEngine 类)时,它的工作......但不是 GBaseGameActivity(BaseGameUtils 类))
public class BaseActivity extends GBaseGameActivity
我尝试编译我的项目,但我得到了:
...
Could not find class 'com.xxx.xxx.util.GameHelper', referenced from method com.xxx.xxx.util.GBaseGameActivity.<init>
Could not find class 'com.xxx.xxx.util.GameHelper', referenced from method com.xxx.xxx.util.GBaseGameActivity.onCreate
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.xxx.xxx.util.GameHelper
at com.xxx.xxx.util.GBaseGameActivity.<init>(GBaseGameActivity.java:63)
at com.xxx.xxx.BaseActivity.<init>(BaseActivity.java:35)
...
GBaseGameActivity.java:63:
63| mHelper = new GameHelper(this);
BaseActivity.java:35:
35| public class BaseActivity extends GBaseGameActivity
问题出在哪里?