Flutter: Why does change in package (flutter-tools) has no impact (in flutter doctor)?
flutter doctor has issues -
Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: a5fb11a50ca9bb90)
Unhandled exception:
NoSuchMethodError: The getter 'isMacOS' was called on null.
Receiver: null
Tried calling: isMacOS
#0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1 IOSDevices.supportsPlatform (package:flutter_tools/src/ios/devices.dart:34)
#2 DeviceManager._platformDiscoverers.<anonymous closure> (package:flutter_tools/src/device.dart:85)
#3 WhereIterator.moveNext (dart:_internal/iterable.dart:439)
It seems to be a bug with flutter. (I don't exactly know what I did, so unable to help reproduce it, but I'm stuck with this issue. Re-installing flutter didn't help too.)
I'm trying to hard-code the platform check in ios/devices.dart, since I'm on windows & developing for android.
But my changes -
`
@override
bool get supportsPlatform {
return false;
`
have no impact.
flutter doctor still throws the same error, at the same line number.
Could it be some caching issue? Or a build issue? (so far it seems that the packages need not be built but maybe they do?)
Instead of recompiling the flutter tools executable on each flutter command invocation, the snapshot is saved in a cache which rebuilds when you upgrade flutter (or really just with each git commits to the repo behind the scene).
To manually trigger a rebuild, you can delete your $FLUTTER_ROOT/bin/cache/flutter_tools.* and the flutter tools will rebuild the next time you invoke flutter
Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: a5fb11a50ca9bb90)
Unhandled exception:
NoSuchMethodError: The getter 'isMacOS' was called on null.
Receiver: null
Tried calling: isMacOS
#0 Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1 IOSDevices.supportsPlatform (package:flutter_tools/src/ios/devices.dart:34)
#2 DeviceManager._platformDiscoverers.<anonymous closure> (package:flutter_tools/src/device.dart:85)
#3 WhereIterator.moveNext (dart:_internal/iterable.dart:439)
It seems to be a bug with flutter. (I don't exactly know what I did, so unable to help reproduce it, but I'm stuck with this issue. Re-installing flutter didn't help too.)
I'm trying to hard-code the platform check in ios/devices.dart, since I'm on windows & developing for android.
But my changes -
`
@override
bool get supportsPlatform {
return false;
`
have no impact.
flutter doctor still throws the same error, at the same line number.
Could it be some caching issue? Or a build issue? (so far it seems that the packages need not be built but maybe they do?)
Instead of recompiling the flutter tools executable on each flutter command invocation, the snapshot is saved in a cache which rebuilds when you upgrade flutter (or really just with each git commits to the repo behind the scene).
To manually trigger a rebuild, you can delete your $FLUTTER_ROOT/bin/cache/flutter_tools.* and the flutter tools will rebuild the next time you invoke flutter
Comments
Post a Comment