'Flutter/Flutter.h' file not found
Closed this issue · 18 comments
After running the command to terminal:
sh scripts/run_apple_tv.sh
An Xcode project will popup.
- I choose the apple tv device
- I clicked on the
▶️ Play button in xcode
But it says "Build Failed", error is:
'Flutter/Flutter.h' file not found
That error is from custom_shared_preferences_ios
Looks like something went wrong during script execution. You can try to execute it step by step. Actually, I'm working on a script update now, will publish it soon
@DenisovAV That's nice! I will be waiting for that release.
You have any ETA?
Context:
I just got hired from a news company, they have tv app made with flutter and we've already have the beta version in play store. Andour next target is apple tv but I got stuck as I dont have any knowledge in objective-c.
I will surely appreciate your efforts!
I have the same problem. I downloaded the engine from https://drive.google.com/drive/folders/1GggBM8TZMjuGvtLKEc3Pi11uNm_KRIqB?usp=sharing
Any clues how to solve it ?
Solved it by setting FLUTTER_LOCAL_ENGINE without the "out" directory
Solved it by setting FLUTTER_LOCAL_ENGINE without the "out" directory
Are you able to run your flutter app in tvOS now?
Solved it by setting FLUTTER_LOCAL_ENGINE without the "out" directory
Are you able to run your flutter app in tvOS now?
Nope, new errors arise with command: "fvm flutter build ios"
@RoboMario how was your app?
Still not running, it improved by entering the shell scripts commands step by step manually but now I am stuck because the engine is compiled for x64 and not for arm to be used on Apple silicon
@RoboMario I have this error while running the app:
Undefined symbol: _FlutterMethodNotImplemented
Have faced this error?
Yes I have the same error running on my M2 MacBook, it is because of the engine complied for x64
I see. Im using m1 mac mini.
I just tried to add "arm64" in the Build settings > Excluded Architecture > any tvos simualtor sdk: arm64
Then new error arises: Command PhaseScriptExecution failed with a nonzero exit code
Hi everyone, sorry for the delayed reply, on vacation now. The following week I'll come back from vacation and I'm going to push changes with support flutter 3.10.x, updates of scripts and arm64 support for the example
Thank you! Looking forward on it!
Hello,
I'm also on a Mac using arm64, but my situation is a bit different.
I'm upgrading from the old Flutter tvOs engine 2.10.3 to latest available 3.3.10.
On 2.10.3 I can build the app for iOS/Android and tvOS.
On 3.3.10 I can build the app only for iOS/Android, and is failing on tvOS.
I'm commenting here as it may be related to arm64 build machines and may help others in the future.
No matter how I change
environment:
sdk: ">=2.16.1 <3.0.0"
I still get the error.
This is a small part of the error that XCode is complaining when trying to build for a debug_sim (simulator TV):
Showing Recent Messages
../../../flutter/packages/flutter/lib/material.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/services.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter_localizations/lib/flutter_localizations.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.15/lib/path_provider.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2013 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/foundation.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cache_manager-3.3.1/lib/flutter_cache_manager.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
/// Generic cache manager for flutter.
^
../../../flutter/packages/flutter/lib/src/material/app_bar.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/app_bar.dart:167:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/app_bar.dart:1474:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/app_bar.dart:2129:43: Error: Expected '}' before this.
const _AppBarTitleBox({ required Widget super.child }) : assert(child != null);
^^^^^
../../../flutter/packages/flutter/lib/src/material/app_bar.dart:2146:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.textDirection,
^^^^^
../../../flutter/packages/flutter/lib/src/material/app_bar_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/arc.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/back_button.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
../../../flutter/packages/flutter/lib/src/material/bottom_app_bar.dart:58:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_app_bar_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/bottom_navigation_bar.dart:174:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:277:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_navigation_bar_theme.dart:279:14: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
required super.child,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_sheet.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/bottom_sheet.dart:74:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_sheet.dart:352:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_sheet.dart:470:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.settings,
^^^^^
../../../flutter/packages/flutter/lib/src/material/bottom_sheet_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/button.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/button.dart:47:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button.dart:447:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.child,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:57:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:237:14: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
required super.children,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:238:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.mainAxisSize,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:239:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.mainAxisAlignment,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:295:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.direction,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:296:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.mainAxisSize,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:297:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.mainAxisAlignment,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:298:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.crossAxisAlignment,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar.dart:299:28: Error: Expected '}' before this.
required TextDirection super.textDirection,
^^^^^
../../../flutter/packages/flutter/lib/src/material/button_bar_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/button_bar_theme.dart:237:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/chip_input.dart:85:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/chip_theme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/chip_theme.dart:47:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/chip_theme.dart:49:14: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
required super.child,
^^^^^
../../../flutter/packages/flutter/lib/src/material/circle_avatar.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/circle_avatar.dart:63:5: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
super.key,
^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/colors.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/colors.dart:23:23: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
const MaterialColor(super.primary, super.swatch);
^^^^^
../../../flutter/packages/flutter/lib/src/material/colors.dart:23:38: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
const MaterialColor(super.primary, super.swatch);
^^^^^
../../../flutter/packages/flutter/lib/src/material/colors.dart:71:29: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
const MaterialAccentColor(super.primary, super.swatch);
^^^^^
../../../flutter/packages/flutter/lib/src/material/colors.dart:71:44: Error: This requires the 'super-parameters' language feature to be enabled.
Try updating your pubspec.yaml to set the minimum SDK constraint to 2.15 or higher, and running 'pub get'.
const MaterialAccentColor(super.primary, super.swatch);
^^^^^
../../../flutter/packages/flutter/lib/src/material/constants.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/curves.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
^
../../../flutter/packages/flutter/lib/src/material/data_table.dart:1:1: Error: The specified language version is too high. The highest supported language version is 2.16.
// Copyright 2014 The Flutter Authors. All rights reserved.
Showing Recent Messages
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:991:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('inverseSurface', inverseSurface, defaultValue: defaultScheme.inverseSurface));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:992:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('onInverseSurface', onInverseSurface, defaultValue: defaultScheme.onInverseSurface));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:993:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('inversePrimary', inversePrimary, defaultValue: defaultScheme.inversePrimary));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:994:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('primaryVariant', primaryVariant, defaultValue: defaultScheme.primaryVariant));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:995:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('secondaryVariant', secondaryVariant, defaultValue: defaultScheme.secondaryVariant));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/color_scheme.dart:996:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('surfaceTint', surfaceTint, defaultValue: defaultScheme.surfaceTint));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/date_picker.dart:482:13: Error: No named parameter with the name 'child'.
child: Text(widget.cancelText ?? localizations.cancelButtonLabel),
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/date_picker.dart:486:13: Error: No named parameter with the name 'child'.
child: Text(widget.confirmText ?? localizations.okButtonLabel),
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/date_picker.dart:1511:15: Error: No named parameter with the name 'child'.
child: Text(confirmText, style: saveButtonStyle),
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/date_picker.dart:2636:13: Error: No named parameter with the name 'child'.
child: Text(cancelText ?? localizations.cancelButtonLabel),
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/date_picker.dart:2640:13: Error: No named parameter with the name 'child'.
child: Text(confirmText ?? localizations.okButtonLabel),
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/desktop_text_selection.dart:343:9: Error: No named parameter with the name 'child'.
child: child,
^^^^^
../../../flutter/packages/flutter/lib/src/material/text_button.dart:77:9: Context: Found this candidate, but the arguments don't match.
const TextButton({
^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/dialog_theme.dart:140:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Try removing the extra positional arguments.
properties.add(ColorProperty('backgroundColor', backgroundColor));
^
../../../flutter/packages/flutter/lib/src/painting/colors.dart:515:3: Context: Found this candidate, but the arguments don't match.
ColorProperty(
^^^^^^^^^^^^^
../../../flutter/packages/flutter/lib/src/material/dialog_theme.dart:144:33: Error: Too many positional arguments: 1 allowed, but 2 found.
Thank you for the help!
@keanallen I succeeded to make a first build using these instructions https://sarunw.com/posts/open-using-rosetta-in-xcode-14-3/
This works for Apple TV simulators (Rosetta)
@keanallen I succeeded to make a first build using these instructions https://sarunw.com/posts/open-using-rosetta-in-xcode-14-3/ This works for Apple TV simulators (Rosetta)
can u help me?
@bypass112 looks like your dart is too old, update your project to dart 3+, and would be nice to discuss your issue in a separate thread
@DenisovAV updating the tvOS project to 3.10.5 worked! I'm not having that issue anymore and can successfully build for tvOS. Thank you!