my machine: Apple M2 Mac mini
my flutter version: 3.24.1
fvm flutter --version
Flutter 3.24.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5874a72aa4 (3 months ago) • 2024-08-20 16:46:00 -0500
Engine • revision c9b9d5780d
Tools • Dart 3.5.1 • DevTools 2.37.2
I git clone https://github.com/DenisovAV/flutter_tv
and update FLUTTER_LOCAL_ENGINE in my local path
export FLUTTER_LOCAL_ENGINE=/Users/nicaho/Downloads/project/flutter_engine/engine/src
and my out files:
/Users/nicaho/Downloads/project/flutter_engine/engine/src/out/host_debug_unopt_arm64
/Users/nicaho/Downloads/project/flutter_engine/engine/src/out/ios_debug_sim_unopt_arm64
fvm flutter pub get
Resolving dependencies...
Downloading packages...
_fe_analyzer_shared 67.0.0 (76.0.0 available)
analyzer 6.4.1 (6.11.0 available)
async 2.11.0 (2.12.0 available)
boolean_selector 2.1.1 (2.1.2 available)
characters 1.3.0 (1.3.1 available)
clock 1.1.1 (1.1.2 available)
collection 1.18.0 (1.19.1 available)
convert 3.1.1 (3.1.2 available)
crypto 3.0.3 (3.0.6 available)
! cupertino_icons 1.0.8 (overridden)
dart_style 2.3.6 (2.3.7 available)
fake_async 1.3.1 (1.3.2 available)
leak_tracker 10.0.5 (10.0.8 available)
leak_tracker_flutter_testing 3.0.5 (3.0.9 available)
logging 1.2.0 (1.3.0 available)
matcher 0.12.16+1 (0.12.17 available)
material_color_utilities 0.11.1 (0.12.0 available)
meta 1.15.0 (1.16.0 available)
path 1.9.0 (1.9.1 available)
shared_preferences 2.2.3 (2.3.3 available)
shared_preferences_android 2.2.2 (2.3.3 available)
! shared_preferences_foundation 2.4.0 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_foundation (overridden)
! shared_preferences_platform_interface 2.3.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_platform_interface (overridden)
shared_preferences_web 2.4.1 (2.4.2 available)
stack_trace 1.11.1 (1.12.0 available)
string_scanner 1.2.0 (1.4.0 available)
test_api 0.7.2 (0.7.3 available)
typed_data 1.3.2 (1.4.0 available)
video_player_android 2.4.14 (2.7.16 available)
! video_player_avfoundation 2.6.1 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_avfoundation (overridden)
! video_player_platform_interface 6.2.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_platform_interface (overridden)
video_player_web 2.3.2 (2.3.3 available)
vm_service 14.2.5 (14.3.1 available)
web 0.5.1 (1.1.0 available)
Got dependencies!
29 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.
fvm flutter build ios --simulator
Building com.example.flutterTv for simulator (ios)...
Running pod install... 617ms
Running Xcode build...
Xcode build done. 10.5s
Failed to build iOS app
Error (Xcode):
../../../../.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.4.1/lib/shared_preferences_linux.da
rt:13:8: Error: Error when reading
'../../../../.pub-cache/git/flutter-tvos-packages-6166fd880015ebc0bc5489a38f63dc3492fff1c9/packages/shared_pre
ferences/shared_preferences_platform_interface/lib/shared_preferences_async_platform_interface.dart': No such
file or directory
Encountered error while building for simulator.
sh scripts/switch_target.sh tvos
switching to 'tvos'
cd ios
fvm flutter pub get
Resolving dependencies in /Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv...
Downloading packages...
_fe_analyzer_shared 67.0.0 (76.0.0 available)
analyzer 6.4.1 (6.11.0 available)
async 2.11.0 (2.12.0 available)
boolean_selector 2.1.1 (2.1.2 available)
characters 1.3.0 (1.3.1 available)
clock 1.1.1 (1.1.2 available)
collection 1.18.0 (1.19.1 available)
convert 3.1.1 (3.1.2 available)
crypto 3.0.3 (3.0.6 available)
! cupertino_icons 1.0.8 (overridden)
dart_style 2.3.6 (2.3.7 available)
fake_async 1.3.1 (1.3.2 available)
leak_tracker 10.0.5 (10.0.8 available)
leak_tracker_flutter_testing 3.0.5 (3.0.9 available)
logging 1.2.0 (1.3.0 available)
matcher 0.12.16+1 (0.12.17 available)
material_color_utilities 0.11.1 (0.12.0 available)
meta 1.15.0 (1.16.0 available)
path 1.9.0 (1.9.1 available)
shared_preferences 2.2.3 (2.3.3 available)
shared_preferences_android 2.2.2 (2.3.3 available)
! shared_preferences_foundation 2.4.0 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_foundation (overridden)
! shared_preferences_platform_interface 2.3.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_platform_interface (overridden)
shared_preferences_web 2.4.1 (2.4.2 available)
stack_trace 1.11.1 (1.12.0 available)
string_scanner 1.2.0 (1.4.0 available)
test_api 0.7.2 (0.7.3 available)
typed_data 1.3.2 (1.4.0 available)
video_player_android 2.4.14 (2.7.16 available)
! video_player_avfoundation 2.6.1 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_avfoundation (overridden)
! video_player_platform_interface 6.2.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_platform_interface (overridden)
video_player_web 2.3.2 (2.3.3 available)
vm_service 14.2.5 (14.3.1 available)
web 0.5.1 (1.1.0 available)
Got dependencies in /Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv!
29 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.
pod install
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).
sh ../scripts/copy_framework.sh debug_sim_arm64 /Users/nicaho/Downloads/project/flutter_engine/engine/src
Coping Flutter.framework (debug-simulator-arm64)...
sed -i '' 's#FLUTTER_LOCAL_ENGINE[[:space:]]=[[:space:]].*;#FLUTTER_LOCAL_ENGINE = "/Users/nicaho/Downloads/project/flutter_engine/engine/src";#g' Runner.xcodeproj/project.pbxproj
open Runner.xcworkspace
Then I run in Xcode, select "Apple TV 4K", tvOS is 15.0
I get the error
Compling /Flutter/App.Framework arm64
└─engine /Users/nicaho/Downloads/project/flutter_engine/engine/src
Build Mode debug
└─Coping Flutter.framework
└─Engine dart version 3.5.0
└─Compiling kernal
result 7fcd8930-45c3-46b5-9c6a-987530e9779a
Unhandled exception:
PathNotFoundException: Cannot open file, path = '/Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv/build/ios/Debug-iphonesimulator/App.framework/flutter_assets/kernel_blob.bin' (OS Error: No such file or directory, errno = 2)
0 _checkForErrorResponse (dart:io/common.dart:55)
1 _File.open. (dart:io/file_impl.dart:381)
#2 _FileStreamConsumer.addStream. (dart:io/file_impl.dart:205)
Command PhaseScriptExecution failed with a nonzero exit code
How can I solve it, Thank you!
my machine: Apple M2 Mac mini my flutter version: 3.24.1 fvm flutter --version
Flutter 3.24.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 5874a72aa4 (3 months ago) • 2024-08-20 16:46:00 -0500 Engine • revision c9b9d5780d Tools • Dart 3.5.1 • DevTools 2.37.2
I git clone https://github.com/DenisovAV/flutter_tv and update FLUTTER_LOCAL_ENGINE in my local path export FLUTTER_LOCAL_ENGINE=/Users/nicaho/Downloads/project/flutter_engine/engine/src and my out files: /Users/nicaho/Downloads/project/flutter_engine/engine/src/out/host_debug_unopt_arm64 /Users/nicaho/Downloads/project/flutter_engine/engine/src/out/ios_debug_sim_unopt_arm64
When I sh scripts/run_apple_tv.sh
ENGINE_TYPE=debug_sim_arm64
export FLUTTER_LOCAL_ENGINE=/Users/nicaho/Downloads/project/flutter_engine/engine/src
FLUTTER_LOCAL_ENGINE=/Users/nicaho/Downloads/project/flutter_engine/engine/src
'[' -d _ios ']'
sh scripts/switch_target.sh ios switching to 'ios'
fvm flutter clean Cleaning Xcode workspace... 1,245ms Cleaning Xcode workspace... 1,666ms Deleting build... 7ms Deleting .dart_tool... 1ms Deleting Generated.xcconfig... 0ms Deleting flutter_export_environment.sh... 0ms Deleting Flutter.podspec... 0ms Deleting ephemeral... 0ms Deleting .flutter-plugins-dependencies... 0ms Deleting .flutter-plugins... 0ms
fvm flutter pub get Resolving dependencies... Downloading packages... _fe_analyzer_shared 67.0.0 (76.0.0 available) analyzer 6.4.1 (6.11.0 available) async 2.11.0 (2.12.0 available) boolean_selector 2.1.1 (2.1.2 available) characters 1.3.0 (1.3.1 available) clock 1.1.1 (1.1.2 available) collection 1.18.0 (1.19.1 available) convert 3.1.1 (3.1.2 available) crypto 3.0.3 (3.0.6 available) ! cupertino_icons 1.0.8 (overridden) dart_style 2.3.6 (2.3.7 available) fake_async 1.3.1 (1.3.2 available) leak_tracker 10.0.5 (10.0.8 available) leak_tracker_flutter_testing 3.0.5 (3.0.9 available) logging 1.2.0 (1.3.0 available) matcher 0.12.16+1 (0.12.17 available) material_color_utilities 0.11.1 (0.12.0 available) meta 1.15.0 (1.16.0 available) path 1.9.0 (1.9.1 available) shared_preferences 2.2.3 (2.3.3 available) shared_preferences_android 2.2.2 (2.3.3 available) ! shared_preferences_foundation 2.4.0 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_foundation (overridden) ! shared_preferences_platform_interface 2.3.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_platform_interface (overridden) shared_preferences_web 2.4.1 (2.4.2 available) stack_trace 1.11.1 (1.12.0 available) string_scanner 1.2.0 (1.4.0 available) test_api 0.7.2 (0.7.3 available) typed_data 1.3.2 (1.4.0 available) video_player_android 2.4.14 (2.7.16 available) ! video_player_avfoundation 2.6.1 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_avfoundation (overridden) ! video_player_platform_interface 6.2.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_platform_interface (overridden) video_player_web 2.3.2 (2.3.3 available) vm_service 14.2.5 (14.3.1 available) web 0.5.1 (1.1.0 available) Got dependencies! 29 packages have newer versions incompatible with dependency constraints. Try
flutter pub outdated
for more information.fvm flutter build ios --simulator Building com.example.flutterTv for simulator (ios)... Running pod install... 617ms Running Xcode build...
Xcode build done. 10.5s Failed to build iOS app Error (Xcode): ../../../../.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.4.1/lib/shared_preferences_linux.da rt:13:8: Error: Error when reading '../../../../.pub-cache/git/flutter-tvos-packages-6166fd880015ebc0bc5489a38f63dc3492fff1c9/packages/shared_pre ferences/shared_preferences_platform_interface/lib/shared_preferences_async_platform_interface.dart': No such file or directory
Encountered error while building for simulator.
sh scripts/switch_target.sh tvos switching to 'tvos'
cd ios
fvm flutter pub get Resolving dependencies in
/Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv
... Downloading packages... _fe_analyzer_shared 67.0.0 (76.0.0 available) analyzer 6.4.1 (6.11.0 available) async 2.11.0 (2.12.0 available) boolean_selector 2.1.1 (2.1.2 available) characters 1.3.0 (1.3.1 available) clock 1.1.1 (1.1.2 available) collection 1.18.0 (1.19.1 available) convert 3.1.1 (3.1.2 available) crypto 3.0.3 (3.0.6 available) ! cupertino_icons 1.0.8 (overridden) dart_style 2.3.6 (2.3.7 available) fake_async 1.3.1 (1.3.2 available) leak_tracker 10.0.5 (10.0.8 available) leak_tracker_flutter_testing 3.0.5 (3.0.9 available) logging 1.2.0 (1.3.0 available) matcher 0.12.16+1 (0.12.17 available) material_color_utilities 0.11.1 (0.12.0 available) meta 1.15.0 (1.16.0 available) path 1.9.0 (1.9.1 available) shared_preferences 2.2.3 (2.3.3 available) shared_preferences_android 2.2.2 (2.3.3 available) ! shared_preferences_foundation 2.4.0 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_foundation (overridden) ! shared_preferences_platform_interface 2.3.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/shared_preferences/shared_preferences_platform_interface (overridden) shared_preferences_web 2.4.1 (2.4.2 available) stack_trace 1.11.1 (1.12.0 available) string_scanner 1.2.0 (1.4.0 available) test_api 0.7.2 (0.7.3 available) typed_data 1.3.2 (1.4.0 available) video_player_android 2.4.14 (2.7.16 available) ! video_player_avfoundation 2.6.1 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_avfoundation (overridden) ! video_player_platform_interface 6.2.2 from git https://github.com/DenisovAV/flutter-tvos-packages.git at 6166fd in packages/video_player/video_player_platform_interface (overridden) video_player_web 2.3.2 (2.3.3 available) vm_service 14.2.5 (14.3.1 available) web 0.5.1 (1.1.0 available) Got dependencies in/Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv
! 29 packages have newer versions incompatible with dependency constraints. Tryflutter pub outdated
for more information.pod install Analyzing dependencies Downloading dependencies Generating Pods project Integrating client project Pod installation complete! There are 4 dependencies from the Podfile and 4 total pods installed.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target
Runner
toTarget Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
or include theTarget Support Files/Pods-Runner/Pods-Runner.profile.xcconfig
in your build configuration (Flutter/Release.xcconfig
).Then I run in Xcode, select "Apple TV 4K", tvOS is 15.0 I get the error Compling /Flutter/App.Framework arm64 └─engine /Users/nicaho/Downloads/project/flutter_engine/engine/src Build Mode debug └─Coping Flutter.framework └─Engine dart version 3.5.0 └─Compiling kernal result 7fcd8930-45c3-46b5-9c6a-987530e9779a Unhandled exception: PathNotFoundException: Cannot open file, path = '/Users/nicaho/Downloads/project/test-flutter-tv/flutter_tv/build/ios/Debug-iphonesimulator/App.framework/flutter_assets/kernel_blob.bin' (OS Error: No such file or directory, errno = 2)
0 _checkForErrorResponse (dart:io/common.dart:55)
1 _File.open. (dart:io/file_impl.dart:381)