79

I am getting the following error while running my app on Android OS 7.1 Nougat.

E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)[ 04-21 10:19:18.788 4410: 4622 D/ ]
HostConnection::get() New Host Connection established 0x7db835ad6200, tid 4622

In build.gradle I am using vectorDrawables.useSupportLibrary = true and the following dependencies:

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs') 
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support',
    module: 'support-annotations'
  }) 
  compile 'com.android.support:appcompat-v7:26.1.0'
  compile 'com.android.support.constraint:constraint-layout:1.0.2'
  testCompile 'junit:junit:4.12'
  compile 'com.google.android.gms:play-services-location:11.6.0'
  compile 'com.google.android.gms:play-services-places:11.6.0'
  compile project(':library')
}

At the build types I have:

buildTypes {
  release {
    minifyEnabled true 
    shrinkResources true 
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  }
}

For the project build.gradle I have:

dependencies {
  classpath 'com.android.tools.build:gradle:3.0.1'
  // NOTE: Do not place your application dependencies here; they belong 
  // in the individual module build.gradle files 
  classpath 'com.google.gms:google-services:3.1.1'
}

In my UI, I am using imageview, ontop of another imageview. The problem appears both on AVD and Real device.

  • Has anyone faced this issue before?
  • What causes this error to occur?
  • What is the solution for this?
madlymad
  • 6,367
  • 6
  • 37
  • 68
KUSHA B K
  • 1,489
  • 13
  • 20
  • Did you get the error on a real device or a virtual device (AVD)? I get the error on an AVD Nexus 5 API 25. – nyluje Jul 17 '17 at 16:11
  • both (AVD and Real device ) – KUSHA B K Aug 09 '17 at 12:40
  • same problem here on a test device – Rk R Bairi Aug 21 '17 at 17:41
  • 1
    Are you using webview ? – jeet.chanchawat Nov 27 '17 at 13:08
  • no i am not using webview. – KUSHA B K Nov 27 '17 at 16:30
  • 1
    So what are you using then. I faced such problems which webview only. Maybe you can post the code with throws this error. – Rainmaker Dec 01 '17 at 18:15
  • 2
    To narrow the problem down people **need more information**. Could you add to your question the following: full stack trace, maybe the code that throws this error (if you know), a list of your dependencies in your Gradle file. Additionally information like does it occur only on Android 7.1 (but not on 5 or 6) or does it occur just on this specific device you are using could be of help. Do you see the same error with an emulated device and Android 7.1? Does the error get thrown randomly or do you see a pattern e.g. always when I open this specific View I have this error in my logcat... – Peppermint Paddy Dec 02 '17 at 09:57
  • dependencies { compile fileTree(include: ['*.jar'], dir: 'libs')androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {exclude group: 'com.android.support', module: 'support-annotations' })compile 'com.android.support:appcompat-v7:26.1.0' compile 'com.android.support.constraint:constraint-layout:1.0.2'testCompile 'junit:junit:4.12' compile 'com.google.android.gms:play-services-location:11.6.0'compile 'com.google.android.gms:play-services-places:11.6.0' compile project(':library') } – KUSHA B K Dec 04 '17 at 07:07
  • i am using imageview,ontop of another imageview. – KUSHA B K Dec 04 '17 at 07:11
  • i'm using : buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } – KUSHA B K Dec 04 '17 at 07:14
  • in build.gradle i am using vectorDrawables.useSupportLibrary = true – KUSHA B K Dec 04 '17 at 07:15
  • dependencies { classpath 'com.android.tools.build:gradle:3.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:3.1.1' } – KUSHA B K Dec 04 '17 at 07:16
  • 1
    @KUSHA Do not add your amendments to the comments section, edit your question instead – Niza Siwale Dec 04 '17 at 07:26
  • Add the full log as well and maybe the code that creates the error – Niza Siwale Dec 04 '17 at 07:27
  • Please add minimal source code, when u get this error. – Fortran Dec 04 '17 at 09:34
  • try to use full-screen activity. for more info read this: – Urvish rana Jul 31 '18 at 06:22
  • 2
    Did anyone find a solution for this issue? Am also facing the same issue only in the Android OS 7.1 application getting crashed on WebView. – Baskaran Veerabathiran Jul 02 '19 at 10:56

1 Answers1

1

I think that "EGL_BAD_DISPLAY" error occurs when there is a problem with the display connection between the Android app and the system. Could be alot of factors without knowing the details (issues with graphics drivers, outdated software, or a conflict with other apps running on the device).

One possible cause of this issue could be related to the use of vector drawables with the support library. When using vector drawables, it's important to ensure that the Android version being used is compatible. Vector drawables require a minimum API level of 21. If you are using an older version of Android, you may need to use the AppCompat library to ensure compatibility.

Try

  1. Updating your app's dependencies to the latest version, including the support library and Google Play Services.
  2. Make sure the Android vers being used is compatible with vector drawables. If not, use the AppCompat library.
  3. If the issue persists, try disabling ProGuard to see if that resolves the issue.
  4. Check for conflicts with other apps running on the device...close other apps to see if the issue goes away.
  5. If none of these steps work, try updating the graphics drivers on the device.
DevKev
  • 5,714
  • 6
  • 24
  • 29