Skip to content

Failed to setup Skia Gr context #11094

Closed
Closed
@simusco

Description

@simusco

Launching lib\main.dart on Samsung Galaxy S6, 5 1 0, API 22, 1440x2560 in debug mode...
Built build\app/outputs/apk/app-debug.apk (21.7MB).
I/flutter ( 1942): [INFO:gpu_surface_gl.cc(51)] Failed to setup Skia Gr context.
Application finished.

Activity

eseidelGoogle

eseidelGoogle commented on Jul 6, 2017

@eseidelGoogle
Contributor

@simusco is this an emulator?

@chinmaygarde or @brianosman what are the right instructions for how to gather the right GPU information here?

brianosman

brianosman commented on Jul 6, 2017

@brianosman

Is this reproducible? That error suggests that just creating the GrContext is failing, which limits how much information you can scrape from within Flutter - typically you would ask the GrContext. We do test Skia on that device - it's got a relatively recent Mali GPU (T7xx).

programadorthi

programadorthi commented on Jul 13, 2017

@programadorthi

Here is happening the same error. I just has created the getting started myapp.

Flutter install the application in my emulator but it freeze in the black screen.

I am using Windows 10 Pro and Android Emulator Samsung Galaxy Tab API 17.

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running 'gradle assembleDebug'...
Built build\app/outputs/apk/app-debug.apk (21.7MB).
Installing build\app/outputs/apk/app.apk... 2.1s
I/flutter ( 3002): [INFO:gpu_surface_gl.cc(51)] Failed to setup Skia Gr context.
Syncing files to device Android SDK built for x86... 1.5s

In my Nexus 5X API 25 emulator it works very well.

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running 'gradle assembleDebug'... 2.0s
Built build\app/outputs/apk/app-debug.apk (21.7MB).
Installing build\app/outputs/apk/app.apk... 1.6s
I/Choreographer( 4441): Skipped 67 frames! The application may be doing too much work on its main thread.
D/EGL_emulation( 4441): eglMakeCurrent: 0xa89855a0: ver 2 0 (tinfo 0xa8983e70)
Syncing files to device Android SDK built for x86... 2.0s

mzimmerm

mzimmerm commented on Jul 29, 2017

@mzimmerm

I am getting the same error in emulator:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running 'gradle assembleDebug'...
Built build/app/outputs/apk/app-debug.apk (21.6MB).
I/flutter ( 2243): [INFO:gpu_surface_gl.cc(51)] Failed to setup Skia Gr context.
Syncing files to device Android SDK built for x86...

This is when launching the demo flutter app (counter), using API level 17, hardware emulation. The application shows completely black after this error. When I change to API level 24, the application works

eseidelGoogle

eseidelGoogle commented on Jul 29, 2017

@eseidelGoogle
Contributor

This is the kind of bug where something like #11402 might be useful. :)

mzimmerm

mzimmerm commented on Jul 29, 2017

@mzimmerm

I guess. BTW, I do not mind this issue at all as long as some SDKs work for me in emulation (and some do). Found this googling and wanted to add it does not seem unique for the reporter. Thanks.

ljfreelancer88

ljfreelancer88 commented on Dec 5, 2017

@ljfreelancer88

I encountered the same issue in emulator and able to fixed by changing the configuration in AVD. Under Emulated Perfomance, set Graphics to Hardware - GLES 2.0

zarinfam

zarinfam commented on Mar 4, 2018

@zarinfam

I am using Windows 10 Pro and I have the same problem on Android Emulator API level 17.

MartinTello

MartinTello commented on Mar 5, 2018

@MartinTello

I am using Windows 10 Education and I have the same problem on Android Emulator API level 16.

eseidelGoogle

eseidelGoogle commented on Mar 5, 2018

@eseidelGoogle
Contributor

flutter run --enable-software-rendering should work as a work-around. CC @mit-mit, @cbracken @chinmaygarde I thought that we had decided to make Android Emulators default to software rendering? (I can't seem to find the issue tracking that)?

MartinTello

MartinTello commented on Mar 5, 2018

@MartinTello

@eseidelGoogle that work, i just find it in #9108

argenisdlopez

argenisdlopez commented on Mar 11, 2018

@argenisdlopez

Jajaja I had the same problem , I created my virtual machine and ran the test drive from this url https://flutter.io/get-started/test-drive/#androidsstudio but not worked in android studio , I had write the option --enable-software-rendering and it works!!!. Why not works like in the official documentation? @eseidel

chinmaygarde

chinmaygarde commented on Mar 12, 2018

@chinmaygarde
Member

Filed #15451 to track whether we should flip the defaults on software rendering on emulators.

Keshava11

Keshava11 commented on Mar 13, 2018

@Keshava11

For Android Studio or IntelliJ users, this is same as what @eseidelGoogle suggested

  1. from command line
    $ <in_project_root> flutter run --enable-software-rendering

  2. from Run/Edit configurations menu in IDE
    flutterrun_additional_args

aymentoumi

aymentoumi commented on Mar 15, 2018

@aymentoumi

For Visual Studio Code users add the following line to launch.json :
"args": ["--enable-software-rendering", "-d", "all"]

4 remaining items

josvos

josvos commented on Sep 6, 2018

@josvos

Just as an update for watchers of this closed issue: see also issue #18601, the problem also/still occurs on physical (older) devices. For more details see my last comment in issue #18601.

nvminhtu

nvminhtu commented on Nov 14, 2019

@nvminhtu

For Visual Studio Code users add the following line to launch.json :
"args": ["--enable-software-rendering", "-d", "all"]

or run command line:

flutter run --enable-software-rendering

Both of them work for me. Thanks all!

garfnadeck

garfnadeck commented on Nov 22, 2019

@garfnadeck

flutter run --enable-software-rendering should work as a work-around. CC @mit-mit, @cbracken @chinmaygarde I thought that we had decided to make Android Emulators default to software rendering? (I can't seem to find the issue tracking that)?

Thank you very much my friend :)

pengchunlin

pengchunlin commented on Dec 27, 2019

@pengchunlin

For Android Studio or IntelliJ users, this is same as what @eseidelGoogle suggested

  1. from command line
    $ <in_project_root> flutter run --enable-software-rendering
  2. from Run/Edit configurations menu in IDE
    flutterrun_additional_args

not work for me

cswxzx

cswxzx commented on Jan 8, 2020

@cswxzx

I have same problem

fzyzcjy

fzyzcjy commented on Jan 23, 2020

@fzyzcjy
Contributor

Hi, I have the problem with a real machine (not Android simulator) bought in 2017 (which is not too old). Thus, why my phone do not support hardware rendering? Will this harm performance? Will many phones do not support hardware rendering, so that Flutter apps will crash on them?? Thanks!

elmissouri16

elmissouri16 commented on Jun 18, 2020

@elmissouri16

enable software rendering can be a workaround for debugging but how about release mode ??

BREN0-MORAIS

BREN0-MORAIS commented on Jun 30, 2020

@BREN0-MORAIS

Para usuários do Visual Studio Code, adicione a seguinte linha ao launch.json :
"args": ["--enable-software-rendering", "-d", "all"]

ou execute a linha de comando:

flutter run --enable-software-rendering

Ambos trabalham para mim. Obrigado a todos!

Obrigado me Ajudo

jasonrichdarmawan

jasonrichdarmawan commented on Feb 9, 2021

@jasonrichdarmawan

flutter run --enable-software-rendering should work as a work-around. CC @mit-mit, @cbracken @chinmaygarde I thought that we had decided to make Android Emulators default to software rendering? (I can't seem to find the issue tracking that)?

Hi, I need to support API 16. It seems this issue present in API 16 (Google APIs) and API 19 (Google APIs).

Is there recommended way to build the apk with --enable-software-rendering with flutter command. Thank you.

Reference to possible solution

github-actions

github-actions commented on Aug 6, 2021

@github-actions

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.

locked as resolved and limited conversation to collaborators on Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @chinmaygarde@cbracken@zarinfam@mzimmerm@nvminhtu

        Issue actions

          Failed to setup Skia Gr context · Issue #11094 · flutter/flutter