I have that layout from a book on Android: Here is defined a CENTER_HORIZONTAL Gravity in the Java code. With a gravity set to CENTER, the application is able to start. With CENTER_HORIZONTAL it cannot open.