0

I am working with new Android application. It works fine with different devices, but I tried to use it with Note 5 (API 24) Android 7.0 and received this error:

does not support the current Display size setting and may behave unexpectedly

this is my gradle:

android {

    compileSdkVersion 26
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "com.example.ahmad.kedmatii"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
}

and here is my mainifest :

  <supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:requiresSmallestWidthDp="600"
    android:smallScreens="true"
    android:xlargeScreens="true" />

So what should I do to solve it?

Artem Mostyaev
  • 3,874
  • 10
  • 53
  • 60

3 Answers3

1

It appears that this is an warning message specific to some Samsung devices. The answer there suggests removing the following line from your manifest:

android:requiresSmallestWidthDp="600"

Additionally, another issue you might face has to do with aspect ratios. You can add support for additional aspect ratios as follows:

<meta-data android:name="android.max_aspect" android:value="2.1" />

By not supporting long aspect ratios, your app will appear with black bars to ensure that it fits well on the screen. This may be preferred over adapting the layout for a small set of devices, but that decision is up to you.

See this answer for more details.

Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
0

Solved by adding in supports-screens

android:xlargeScreens="true"

and removing:

android:requiresSmallestWidthDp="600"

for more help

Hope this help you

InsaneCat
  • 2,115
  • 5
  • 21
  • 40
-1
android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "naveen.naveen.sendsms"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
Aman Shekhar
  • 2,719
  • 1
  • 18
  • 29