0
\$\begingroup\$

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

\$\endgroup\$
3
  • \$\begingroup\$ What is the exception that causes the crash? Is there more details in logcat? \$\endgroup\$ – bornander Feb 9 '16 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 Quinonez Feb 9 '16 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 Quinonez Feb 9 '16 at 18:55
-1
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.