I am making a game in Android Studio using LibGDX. The game is all but complete, but I am having trouble running the game on an old phone I have. I originally made and tested the game on the desktop, and only recently changed it so it could run on a mobile device by changing the Configurations. The game has no errors in it, and it runs perfectly on desktop. On an emulator it ran completely, it was just incredibly slow, which is why I switched to a real device.
I am running the game on an old moto g phone, and the game properly downloads and opens on the phone. The phone runs on Android 5.1 and cannot be updated further. I made my game on Android Studio version 3.1.4, and cannot update that either due to to LibGDX not being compatible with newer models of Android Studio.
The first screen that opens is my Menu, which has only a play button. The music for the Menu plays and when you press the play button, the sound of the button being pressed can be heard, but then the screen goes black for a second and the game closes. There is no "Unfortunately, app has stopped" message, the game just closes. It is still open in the background, which you can see when you look at all of the open "tabs" on the phone. If you select that tab, the game reopens to the Menu screen, and the issue happens again.
Thinking the problem was an error, I looked at the logcat for the phone as the game ran. The only red errors that appeared was the following:
4727-4785/com.mygdx.game E/MediaPlayer: Should have subtitle controller already set
This error repeated 6 times in a row, and were the last lines of code before I pressed the play button. After I did, the following three lines appeared in the logcat and then the game ended:
4727-4753/com.mygdx.game W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client
4727-4753/com.mygdx.game W/linker: libgdx-box2d.so: unused DT entry: type 0x6ffffffe arg 0xf4fc
4727-4753/com.mygdx.game W/linker: libgdx-box2d.so: unused DT entry: type 0x6fffffff arg 0x2
There are no other errors in my logcat, so I don't know what could possibly cause this error, and I have been searching for a solution for quite some time.
Edit:
When my game ends, there is no stack trace specifying what Exception was thrown or anything like that. There is no more red code after the game ends or just before it ends. It is as if the game just stops, there is no error that causes it that i can discern.