how to fix error DevFS synchronization failed when installing flutter SVG package?


I got this flutter_SVG package

updated pubspec.yaml as below

    sdk: flutter

  cupertino_icons: ^0.1.3
  flutter_svg: ^0.17.4

clicked the pub get button and done properly

I confirmed that my SVG file is properly put in under assets in the pubspec.yaml

then in Home.dart where I want, I imported the package normally, and below is the code where the svg should work as per package readme instructions

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class HomeState extends State<Home> {
  TextEditingController _foo = new TextEditingController();

  Widget build(BuildContext context) {

    const pyramidsYellowIcon = 'my_assets/icons/pyramids_yellow.svg';
    const followIconOffIcon = 'my_assets/icons/follow_icon_off.svg';

    return Stack(

          children: <Widget>[

              child: SvgPicture.asset(followIconOffIcon, semanticsLabel: 'follow',),

then a hot reload error shows DevFS synchronization failed

and below logcat shows

2020-07-02 12:43:21.375 3019-3019/? E/GmsClientSupervisor: Timeout waiting for ServiceConnection callback
    at tlk.handleMessage(PG:6)
    at android.os.Handler.dispatchMessage(
    at tzg.a(PG:5)
    at tzg.dispatchMessage(PG:4)
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)

any, of course, the emulator refuses to reload, when I delete all changes mentioned above, everything is fixed and normal


After you add a package or an asset the hot reload doesn’t work. You have to restart the app.

Answered By – Niteesh

Answer Checked By – David Marino (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *