Merge pull request #1113 from abarth/handle_port_error
`flutter start` crashes when port 8181 is in use
This commit is contained in:
commit
e3668470c7
@ -772,7 +772,11 @@ class AndroidDevice extends Device {
|
|||||||
void _forwardObservatoryPort() {
|
void _forwardObservatoryPort() {
|
||||||
// Set up port forwarding for observatory.
|
// Set up port forwarding for observatory.
|
||||||
String portString = 'tcp:$_observatoryPort';
|
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, {
|
bool startBundle(AndroidApk apk, String bundlePath, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user