Search code examples
javaandroidandroid-support-libraryandroid-sdk-toolsandroid-11

Black dead area above app activity since Android 11


Since Android 11, a large black area appeared above my app. I use multiple different activities (mostly RelativeLayout) and all of them are affected, so I don't think it's a layout issue. Switching between ActionBarActivity and AppCompatActivity or changing the SDK or build tools version also didn't affect the black space.

Settings:

  • compileSdkVersion 29
  • buildToolsVersion '29.0.2'
  • minSdkVersion 14
  • targetSdkVersion 29
  • com.android.support:appcompat-v7:28.0.0

Does anyone know how to fix this or have a similar problem?

enter image description here


Solution

  • I found the solution:

    Add to the AndroidManifest.xml:

    <supports-screens
            android:anyDensity="true" />