Shalitha Jayamal
Shalitha Jayamal

Reputation: 171

there is an issue on flutter app when run flutter run

ERROR:flutter/shell/gpu/gpu_surface_gl.cc(70)] Failed to setup Skia Gr context. Error connecting to the service protocol: failed to connect to http://127.0.0.1:50930/6r2skviwLRI=/

 
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        
        primarySwatch: Colors.blue,
        
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

is this firewall or antivirus software issue?

Upvotes: 2

Views: 6005

Answers (3)

Alok
Alok

Reputation: 9018

I guess this might be your work around. It happens usually on emulators. So, let me know if that works out for you.

flutter run --enable-software-rendering

--enable-software-rendering is the key, however, I can't find the issue tracker anywhere.

Upvotes: 11

user16582941
user16582941

Reputation: 1

When your IDE is Android Studio, At AVD Manager, Click the pencil icon and button, then at [Emulated Performance]-[Graphics] Select Software-GLES1.1 then [finish] button.... And it will be Ok ..

Upvotes: 0

Ruman
Ruman

Reputation: 1044

If you wanna run your app from terminal then simply enter the command

  • flutter run --enable-software-rendering

If you are willing to run your app resolving this issue in android studio then

  • Run->Edit Configuration-> in Additional Arguments field add this --enable-software-rendering ->press Apply -> press Ok. Now restart your emulator again. Hope your problem will go.

Solution for VsCode :

  • open launch.json file by going Run -> Open Configuration and

  • add a specific argument "args": ["--enable-software-rendering", "-d", "all"] like

  • `"configurations": [

    {
        "name": "virtual_prescriber",
        "request": "launch",
        "type": "dart",
        "args": ["--enable-software-rendering", "-d", "all"]
    }
    

    ]`

  • finally go to Run -> Run Without Debugging .hope everything will work fine

Upvotes: 6

Related Questions