Flutter android app crashes upon startup if I include a certain package

后端 未结 5 647
庸人自扰
庸人自扰 2021-01-06 01:33

A problem has suddenly recently arisen such that simply by including the dependency in \'location\' in pubspec.yaml like e.g.

dependencies:
  flutter:
             


        
5条回答
  •  再見小時候
    2021-01-06 02:02

    I had the same issue with physical android device as well as the emulator. I am not entirely sure how I resolved this but here are the steps:

    • Use a lower version of the same package (cached_network_image in my case) in pubspec.yaml.
    • If app still crashes, run flutter upgrade and flutter packages get again.
    • Completely stop and restart your app (No reloading). It must not crash now.

    Point to note is that my app didn't crash even after changing the package version back to the latest in the pubspec.yaml after performing the above 3 steps.

提交回复
热议问题