Caused by: java.lang.InstantiationException: can't instantiate class com.example.seven.Main; no empty constructor
This exception with the hint in stacktrace that the framework was trying to instantiate your activity explains the issue: You have listed your Main
class as an activity in the manifest. The class is not an Activity
, though the instantiation fails earlier to missing empty constructor (since you've overridden the constructor) and not later when the created object was cast to an Activity
.
Seems like GFX
is your main activity.
To fix it, change Main
activity from manifest to GFX
.
In your edited question, keep the action
as MAIN
here:
<action android:name="android.intent.action.GFX" />
Change to
<action android:name="android.intent.action.MAIN" />
It's there to specify the main entry point of your app and the name has nothing to do with your code.