So I wanted to use Android Studio to create the menu for my game so I created a button with an onClick method that included the Intent i and startActivity(i) but when I clicked the button the app would just crash on me
-
\$\begingroup\$ What is the exception that causes the crash? Is there more details in logcat? \$\endgroup\$– bornanderFeb 9, 2016 at 15:51
-
\$\begingroup\$ "Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.mygdx.game/com.mygdx.game.bantz}; have you declared this activity in your AndroidManifest.xml?" I'm not sure if this is the reason why. Do all activities have to be in the manifest for them to be able to run? \$\endgroup\$– Andrew QuinonezFeb 9, 2016 at 18:26
-
\$\begingroup\$ Ok yeah I had to add it to the manifest, but not the exact libgdx java file but rather the AndroidLauncher java file that's in the android java folder instead of the core libgdx folder \$\endgroup\$– Andrew QuinonezFeb 9, 2016 at 18:55
1 Answer
LibGDX has an AndroidLauncher file that's located in the Android java folder that opens up the game file in the core folder but you have to add it to the android manifest for it to work