Commit e3668470 authored by Adam Barth's avatar Adam Barth

Merge pull request #1113 from abarth/handle_port_error

`flutter start` crashes when port 8181 is in use
parents 06b566bd 3615827f
......@@ -772,7 +772,11 @@ class AndroidDevice extends Device {
void _forwardObservatoryPort() {
// Set up port forwarding for observatory.
String portString = 'tcp:$_observatoryPort';
runCheckedSync(adbCommandForDevice(['forward', portString, portString]));
try {
runCheckedSync(adbCommandForDevice(['forward', portString, portString]));
} catch (e) {
logging.warning('Unable to forward observatory port ($_observatoryPort):\n$e');
}
}
bool startBundle(AndroidApk apk, String bundlePath, {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment