java – How to set portrait mode with libGDX?-ThrowExceptions

Exception or error:

I’ve created a game, and it is OK in desktop mode, but when i launch it on my S3, it goes in landscape mode, how can i change it?

Thank you in advance

How to solve:

enter image description here


  • landscape
  • portrait
  • unspecified
  • behind
  • reverseLandscape
  • reversePortrait
  • sensorLandscape
  • sensorPortrait

For more information you can visit: Android Activity Element


Have a look at the <activity> element. You can set the orientation as:

android:screenOrientation=["unspecified" | "behind" |
                                     "landscape" | "portrait" |
                                     "reverseLandscape" | "reversePortrait" |
                                     "sensorLandscape" | "sensorPortrait" |
                                     "userLandscape" | "userPortrait" |
                                     "sensor" | "fullSensor" | "nosensor" |
                                     "user" | "fullUser" | "locked"]

Leave a Reply

Your email address will not be published. Required fields are marked *