4

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?

5
  • 1
    What channel are you working on? Commented Apr 16, 2018 at 13:27
  • Is this with Emulator, real phone, or both? Commented Apr 16, 2018 at 13:32
  • @GünterZöchbauer it's on both. Dan I am working on the master channel Commented Apr 16, 2018 at 14:45
  • If you run flutter channel what does it show? Have you tried channel master? (flutter channel master flutter doctor) Commented Apr 16, 2018 at 14:47
  • I've seen some issues of late around hot reload and asset bundles in Master - it's very likely that you need to either get more up to date on master (some PRs were merged in the last few days - try flutter upgrade) or switch to the beta channel: flutter channel beta Commented Apr 16, 2018 at 16:52

1 Answer 1

3

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).

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you Dan, like you advised I upgraded everything once again and hot reload is now working as before. Thank you

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.