Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter run doesn't work with the Android Emulator with Hardware Rendering (Linux) #12112

Closed
Pacane opened this issue Sep 15, 2017 · 6 comments
Closed

Comments

@Pacane
Copy link
Contributor

Pacane commented Sep 15, 2017

Steps to Reproduce

  • In Android Studio:

    • Create AVD (Any API level as I think) (I used a Pixel, Android 8.0 with API 26).
    • Set Graphics to Auto or Hardware - GLES 2.0
    • Launch the emulator
    • The Emulator launches properly
      image
  • In command line:

    • Flutter run
    • The app runs, but the screen is black. See screenshot
      image

flutter run logs

 ❯ flutter run                                                                                                                                                                                                         [08:40:51]
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                0.6s
Resolving dependencies...                             1.0s
Running 'gradlew assembleDebug'...                        
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Built build/app/outputs/apk/app-debug.apk (29.1MB).
D/EGL_emulation( 3241): eglMakeCurrent: 0xa2704540: ver 3 1 (tinfo 0xa2703dd0)
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x000082da
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x00008824
D/        ( 3241): SurfaceInterface::setAsyncMode: set async mode 1
D/EGL_emulation( 3241): eglCreateContext: 0x9fefd080: maj 3 min 1 rcv 4
D/        ( 3241): SurfaceInterface::setAsyncMode: set async mode 1
D/EGL_emulation( 3241): eglMakeCurrent: 0x9fefd080: ver 3 1 (tinfo 0x9fef4960)
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x000082da
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x00008824
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x00008f38
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x000090ca
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x000090ce
E/eglCodecCommon( 3241): glUtilsParamSize: unknow param 0x000090cf
Syncing files to device Android SDK built for x86...      
D/        ( 3241): HostConnection::get() New Host Connection established 0xa26e4900, tid 3259
D/EGL_emulation( 3241): eglMakeCurrent: 0x9fefd080: ver 3 1 (tinfo 0x9fef49a0)
D/EGL_emulation( 3241): eglMakeCurrent: 0xa2704540: ver 3 1 (tinfo 0xa2703dd0)
D/EGL_emulation( 3241): eglMakeCurrent: 0x9fefd080: ver 3 1 (tinfo 0x9fef49a0)
D/EGL_emulation( 3241): eglMakeCurrent: 0x9fefd080: ver 3 1 (tinfo 0x9fef49a0)

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:8100/
For a more detailed help message, press "h". To quit, press "q".

Although, if I use flutter run --enable-software-rendering the app shows up properly, but is running much slower obviously.
image

flutter run --enable-software-rendering logs

 ❯ flutter run --enable-software-rendering                                                                                                                                                                             [08:47:14]
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                0.5s
Resolving dependencies...                             0.7s
Running 'gradlew assembleDebug'...                        
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Built build/app/outputs/apk/app-debug.apk (29.1MB).
Syncing files to device Android SDK built for x86...      
D/        ( 3459): HostConnection::get() New Host Connection established 0xabd7be00, tid 3476
D/EGL_emulation( 3459): eglMakeCurrent: 0xa2704540: ver 3 1 (tinfo 0xa2703ea0)

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:8104/
For a more detailed help message, press "h". To quit, press "q".

Operating system details:

  • Using Arch Linux with up-to-date Nvidia drivers (v.384.69). (App loads as a black screen when using hardware rendering)
  • Using Mac OSX with I don't know what drivers (App loads properly with hardware rendering)

Other information

  • This seems to be a flutter issue, since I've tried running a regular Android app from Android Studio and it works fine.
  • For what it's worth, I've tried loading multiple apps, so the issue doesn't seem to be with my app.
  • Also, this used to work about a week ago, either before upgrading flutter or my system config.

Logs

See in report.

Flutter Analyze

 ❯ flutter analyze                                                                                                                                                                                                     [08:40:15]
Analyzing /home/joel/code/dart/descent_randomizer...
No issues found!
Ran in 5.4s

Flutter Doctor

 ❯ flutter doctor                                                                                                                                                                                                                 [08:42:49]
[✓] Flutter (on Linux, locale en_CA.UTF-8, channel master)
    • Flutter at /home/joel/code/flutter
    • Framework revision dc47238602 (2 hours ago), 2017-09-15 12:26:00 +0200
    • Engine revision 0e8ffa24e0
    • Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.1)
    • Android SDK at /opt/android-sdk
    • Platform android-26, build-tools 26.0.1
    • ANDROID_HOME = /opt/android-sdk
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version openjdk version "1.8.0_112-release"

[✓] Android Studio (version 2.3)
    • Android Studio at /opt/android-studio
    • Java version openjdk version "1.8.0_112-release"

[✓] IntelliJ IDEA Ultimate Edition (version 2017.2)
    • Flutter plugin version 17.0
    • Dart plugin version 172.3968.27

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • Flutter plugin version 17.0
    • Dart plugin version 173.2099.6

[✓] Connected devices
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

For more information about diagnosing and reporting Flutter bugs, please see https://flutter.io/bug-reports/.

@eseidelGoogle
Copy link
Contributor

Thank you for the very detailed bug report. @chinmaygarde @jason-simmons

@eseidelGoogle
Copy link
Contributor

My understanding was @chinmaygarde made a recommendation at some point that we should default to software rendering for Android emulators? I can't seem to find it.

@xster
Copy link
Member

xster commented Mar 2, 2018

If it's not the default mode, we might need a way to opt-in from IDEs as well https://stackoverflow.com/questions/49049915/flutter-sample-app-not-working#comment85106918_49050620

@Hixie
Copy link
Contributor

Hixie commented Mar 2, 2018

This is a dupe of #13336.

@Hixie Hixie closed this as completed Mar 2, 2018
@emilson-silva
Copy link

Valeu pelas dicas, resolvido o problema

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants