skip to Main Content

When I ran my flutter app on an android emulator for the first time it ran smoothly. However, after the first launch, it shows an error.
Here is the error:

✓  Built build/app/outputs/flutter-apk/app-debug.apk.
I/ample.food_fete( 6664): Compiler allocated 4533KB to compile void android.view.ViewRootImpl.performTraversals()
Connecting to VM Service at ws://127.0.0.1:41429/ZIJH4M0Maio=/ws
9
E/emuglGLESv2_enc( 6664): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2183 GL error 0x502
W/Parcel  ( 6664): Expecting binder but got null!

I have tried to uninstall android studio updating things to the latest but this problem persists. Is there anyone who can help me?

2

Answers


  1. Chosen as BEST ANSWER

    For now, I have found a way. After first run everytime it shows this error. Now before starting the app I go into that app info and delete the cache then it runs fine without any oepengl error. And with running on hardware mode my emulator runs good. But still sometimes emulator does not open correctly then close and open it again works. I do not what is the main problem. But I think it is also related to that error which shows flutter doctor --android-licenses  ✔ Warning: This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. Warning: Errors during XML parse: Warning: Additionally, the fallback loader failed to parse the XML. [=======================================] 100% Computing updates... All SDK package licenses accepted. So here as it was not able to comprehend those XML files maybe it also could be because of that opengl is not able to respond well.


  2. Steps to reproduce

    1. flutter create test_drive
    2. cd test_drive
    3. Start Android emulator
    4. flutter run
    5. Press the back button/close the app
    6. Reopen the app from the launcher
    7. Expected results: The app runs normally and shows correctly.
    8. Actual results: The app does not render correctly and GL/GLESv2 errors are thrown. It is fixed when clearing the data of the app, but it happens again after it is re-opened.

    error:
    E/emuglGLESv2_enc( 5842): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502

    1. image with error
    2. flutter doctor
    3. sdk tools
    4. avd settings

    I think the error may be related to acceleration for the Android Emulator: Configure hardware acceleration for the Android Emulator

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search