E/EGL_emulation: tid 2633: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)

时间:2021-12-11 15:23:58

Hi I'm dummy at android programming, then I got some problem with building app. I tried to build apps with this xml code: `

你好,我是android编程的傻瓜,然后我在构建app的时候遇到了一些问题,我尝试用这个xml代码构建应用程序:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.ebookfrenzy.androidsample.MainActivity">

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="textPersonName"
        android:text="@string/Namestring"
        android:ems="10"
        android:layout_above="@+id/button"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="28dp"
        android:id="@+id/editText" />

    <Button
        android:text="@string/PressMeString"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/button"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:textAllCaps="false" />
</RelativeLayout>

Then I got this error in ADV machine:

然后我在机器上犯了这个错误:

$ adb shell am start -n "com.ebookfrenzy.androidsample/com.ebookfrenzy.androidsample.AndroidSampleActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 2542 on device emulator-5554
I/art: Not late-enabling -Xcheck:jni (already on)
W/System: ClassLoader referenced unknown path: /data/app/com.ebookfrenzy.androidsample-1/lib/x86_64
I/InstantRun: Instant Run Runtime started. Android package is com.ebookfrenzy.androidsample, real application class is null.
W/System: ClassLoader referenced unknown path: /data/app/com.ebookfrenzy.androidsample-1/lib/x86_64
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                  [ 12-18 20:03:53.363  2542: 2542 D/         ]
                  HostConnection::get() New Host Connection established 0x7f710991c140, tid 2542


                  [ 12-18 20:03:53.377  2542: 2542 W/         ]
                  Process pipe failed

                  [ 12-18 20:03:53.502  2542: 2587 D/         ]
                  HostConnection::get() New Host Connection established 0x7f710991b3c0, tid 2587
I/OpenGLRenderer: Initialized EGL, version 1.4
E/EGL_emulation: tid 2587: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x7f710139e400, error=EGL_BAD_MATCH

Some answers in it says "Try to set Randering to "Harware Randering", But it does not work and receive same error messages. How can I fix it?

其中的一些回答说,“试着将恶意软件设置为“骚扰”,但是它不工作,并且接收到相同的错误信息。我怎样才能修好它?

1 个解决方案

#1


0  

Why this happens? I found the following:

为什么发生这种情况呢?我发现以下几点:

EGL_BAD_MATCH is generated if attribute is EGL_SWAP_BEHAVIOR, value is EGL_BUFFER_PRESERVED, and the EGL_SURFACE_TYPE attribute of the EGLConfig used to create surface does not contain EGL_SWAP_BEHAVIOR_PRESERVED_BIT.

EGL_BAD_MATCH是在属性为EGL_SWAP_BEHAVIOR的情况下生成的,值是egl_buffer_,用于创建表的EGLConfig的EGL_SURFACE_TYPE属性不包含EGL_SWAP_BEHAVIOR - preserved_bit。

Reference: eglSurfaceAttrib The khronos group is a non-profit organisation that provides a standard OpenGL interface.

khronos集团是一家提供标准OpenGL接口的非盈利组织。

How do you solve this? In your Android Emulator you can use the Built-in (Hardware) Graphics Card. I hope this helps.

你怎么解决这个问题?在您的Android模拟器中,您可以使用内置的(硬件)图形卡。我希望这可以帮助。

#1


0  

Why this happens? I found the following:

为什么发生这种情况呢?我发现以下几点:

EGL_BAD_MATCH is generated if attribute is EGL_SWAP_BEHAVIOR, value is EGL_BUFFER_PRESERVED, and the EGL_SURFACE_TYPE attribute of the EGLConfig used to create surface does not contain EGL_SWAP_BEHAVIOR_PRESERVED_BIT.

EGL_BAD_MATCH是在属性为EGL_SWAP_BEHAVIOR的情况下生成的,值是egl_buffer_,用于创建表的EGLConfig的EGL_SURFACE_TYPE属性不包含EGL_SWAP_BEHAVIOR - preserved_bit。

Reference: eglSurfaceAttrib The khronos group is a non-profit organisation that provides a standard OpenGL interface.

khronos集团是一家提供标准OpenGL接口的非盈利组织。

How do you solve this? In your Android Emulator you can use the Built-in (Hardware) Graphics Card. I hope this helps.

你怎么解决这个问题?在您的Android模拟器中,您可以使用内置的(硬件)图形卡。我希望这可以帮助。