我正试图在Android Studio中解决这个问题,但我找不到找到开始第二堂课的方法。
public FrontViewPanel(Context context) {
super(context);
this.mContext = context;
}
和
line 41 Intent intent = new Intent(mContext, GamePanel.class);
line 42 mContext.startActivity(intent);
不起作用:
06-27 12:20:05.023 16332-16332/samuel.kaufmann.myapplication E/InputEventReceiver: Exception dispatching input event.
06-27 12:20:05.023 16332-16332/samuel.kaufmann.myapplication E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
06-27 12:20:05.062 16332-16332/samuel.kaufmann.myapplication E/MessageQueue-JNI: android.content.ActivityNotFoundException: Unable to find explicit activity class {samuel.kaufmann.myapplication/samuel.kaufmann.myapplication.GamePanel}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1637)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1434)
at android.app.Activity.startActivityForResult(Activity.java:3434)
at android.app.Activity.startActivityForResult(Activity.java:3395)
at android.app.Activity.startActivity(Activity.java:3630)
at android.app.Activity.startActivity(Activity.java:3598)
at samuel.kaufmann.myapplication.FrontViewPanel.onTouchEvent(**FrontViewPanel.java:42**)
还有另一个命令来启动GamePanel类吗?