planets-flutter
planets-flutter copied to clipboard
(SWIFT_VERSION) build setting must be set to a supported value
Disclaimer: this is the 1st project I am trying to open with flutter so maybe I am doing a novice mistake here.
When I execute flutter run I see this error:
$ flutter run
Running "flutter packages get" in planets-flutter... 4.1s
Launching lib/main.dart on iPhone Xʀ in debug mode...
Removing obsolete reference to app.flx from Runner.app
Running Xcode build...
Xcode build done. 0.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to
a supported value for targets which use Swift. Supported values are: 4.0,
4.2, 5.0. This setting can be set in the build settings editor.
I tried to replace "SWIFT_VERSION" with:
- 5.0: don't build
- 4.2: don't build
- 4.0: build but I get an error when I click in a planet:
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown building Builder(dirty):
flutter: type 'List<String>' is not a subtype of type 'String'
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter: https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Routes.planetDetailHandler.<anonymous closure> (package:planets/Routes.dart:11:41)
flutter: #1 Router.matchRoute.<anonymous closure>.<anonymous closure> (package:fluro/src/router.dart:144:28)
flutter: #2 PageRouteBuilder.buildPage (package:flutter/src/widgets/pages.dart:107:12)
flutter: #3 _ModalScopeState.build.<anonymous closure> (package:flutter/src/widgets/routes.dart:655:43)
flutter: #4 Builder.build (package:flutter/src/widgets/basic.dart:6035:41)
flutter: #5 StatelessElement.build (package:flutter/src/widgets/framework.dart:3789:28)
flutter: #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3736:15)
flutter: #7 Element.rebuild (package:flutter/src/widgets/framework.dart:3559:5)
flutter: #8