Black bar appears on bottom of screen(Android)

On one of my testing devices when I run my cocos2d-x game it has a black bar at the bottom like the one above in the picture, does anybody know how to remove this or more information on it?

What’s the Android version running on this device? The dialog seems to be a very old Android version (I would guess below 4.4). I thing you can’t do anything, if it’s only on this device.

My first thought was, that your targetSDK is way to low, but then you would see BACK, HOME, RECENT and MENU (the three dots) in the Navigation Bar. But the main buttons are missing, so I would say, it’s something the OEM did.

Hello mars it is a Kyocera running 4.4.2, this is the article i got the picture from https://forums.androidcentral.com/htc-one-m7/271914-anyone-know-how-get-black-bar-bottom-apps-go-away.html

But actually I just started up this phone again, and when I originally built the Cocos2d-x game with V3.9 back in the beginning of 2016 the bar was there, but now I have just rebuilt with 3.17 and the bar is no longer in the game screen :slight_smile: , must of been some code cocos2d-x team modified in the android files ?

Sure. This ist the issue:

v3.9: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.9/templates/cpp-template-default/proj.android-studio/app/build.gradle#L9

v3.17: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.17/templates/cpp-template-default/proj.android/app/build.gradle#L10 and https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.17/templates/cpp-template-default/proj.android/gradle.properties#L27

The “menu” dots is visible, because of targetSDK 10. I wrote this in the first comment, because Google removed the menu hardware button und in order to be able to use old apps, they introduced a legacy menu button right there. So your device from the screenshot has 3 hardware button (back, home, recent) and the menu is created by the system. If your app has a target below 11 it will show up. There was a blog post from Google in 2012 about it: https://android-developers.googleblog.com/2012/01/say-goodbye-to-menu-button.html

PS: You should mark this thread as solved :wink:

1 Like