While testing Flutter apps on a connected (by USB) Android (Samsung S5, running API 23) device using:
Android Studio 20201.3.1 Patch 3 Mac OS Monterey
The app will run on the device the first time, but subsequent attempts result in the run tab saying:
Error connecting to the service protocol: failed to connect to http://127.0.0.1...
The only way I can solve it is by restarting the device (the phone).
There must be a better way than restarting the device every time I test/build.
Does anyone know the cause and/or solution to this?