spongyboss
spongyboss

Reputation: 8666

Flutter Hot Reload

Ever since I updated Flutter for Android Studio, I have been getting this fatal crash everytime I try to run a hot reload:

Initializing hot reload...
I/flutter (20514): [INFO:engine.cc(582)] Could not configure asset bundle at path: /data/user/0/com.natech.flutterlaunch/cache/flutter_launchZTLJVC/flutter_launch/build/flutter_assets
D/MALI    (20514): osup_destructor:170: osup_destructor
Lost connection to device.

After this error, my code changes do not bother reflecting on the app even when I run a full restart. Even if I remove all the widgets from the screen in hope it shows a blank space, the app remains the same. Here is my code:

class SplashScreen extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return new Container(
      decoration: new BoxDecoration(
        image: splashBackgroundImage
      ),
      child: new Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          new Container(
            width: 200.0,
            height: 200.0,
            alignment: Alignment.center,
            decoration: new BoxDecoration(
                image: logoImage
            ),
          )
          ,/*new CircularProgressIndicator(
            value: null,
            strokeWidth: 1.0,
            valueColor: new AlwaysStoppedAnimation<Color>(
              Colors.blue
            ),
          )*/
        ],
      ),
    );
  }

}

As you can see I commented out the CircularProgressIndicator but it still shows on the app even after a full restart. Anyone know what might be the issue?

Upvotes: 4

Views: 1741

Answers (1)

Dan Field
Dan Field

Reputation: 21641

This is very likely due to tracking the master branch, which has had a little instability in the last week or so around hot reloading and asset bundles.

You can try doing a flutter upgrade to see if the latest work in master will resolve your issues; it's more likely that you should be tracking beta (flutter channel beta) instead (or deal with hot reload not working until some more things are ironed out in master).

Upvotes: 3

Related Questions