DenisovAV / flutter_tv

230 stars 40 forks source link

'Flutter/Flutter.h' file not found #32

Closed borisverbitckii closed 1 month ago

borisverbitckii commented 3 months ago

I'm trying to run a demo application, but I keep encountering the issue that Flutter/Flutter.h cannot be found.

I've downloaded two archives to run the application on a tvOS simulator:

3.19.6 and 3.16.9

I've tried setting the FLUTTER_LOCAL_ENGINE in different ways:

export FLUTTER_LOCAL_ENGINE=/Users/borisverbitskii/Desktop/engine/src export FLUTTER_LOCAL_ENGINE=/Users/borisverbitskii/Desktop/engine In this case, the downloaded files were unpacked in these paths.

export FLUTTER_LOCAL_ENGINE=/Users/borisverbitskii/Desktop/engine/src/host_debug_unopt_arm64 export FLUTTER_LOCAL_ENGINE=/Users/borisverbitskii/Desktop/engine/src/ios_debug_sim_unopt_arm64 In this case, I pointed to the specific folders of the downloaded files.

===========================

I have an M1 Mac, so I use the command:

sh scripts/run_apple_tv.sh debug_sim_arm64

===========================

Here is my main Flutter version:

➜ flutter_tv git:(master) ✗ flutter --version Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision b0850beeb2 (3 weeks ago) • 2024-07-16 21:43:41 -0700 Engine • revision 235db911ba Tools • Dart 3.4.4 • DevTools 2.34.3

===========================

My installation logs:

➜ flutter_tv git:(master) ✗ sh scripts/run_apple_tv.sh

[!] 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).

Снимок экрана 2024-08-04 в 22 29 33

Any idea what I'm doing wrong?

DenisovAV commented 3 months ago

Hello, at this moment the last supported flutter version is 3.19.6, you should install fvm and switch your flutter version for the project to 3.19.6

so you need to download only 3.19.6 engine and unzip it to Users/borisverbitskii/Desktop/engine/src/out folder

please check all steps and try again

jtkeyva commented 1 month ago

you keep talking about this 'out' folder? what do you mean?

i download a zip file, can't i jsut set the path to my download folder and then the name of the folder? ios_debug_sim_unopt_arm64

like can't this be ok?

export FLUTTER_LOCAL_ENGINE=/Users/me/code/apple-tv/flutter/ios_debug_sim_unopt_arm64

i have fvm installed and using 3.24.1

i am getting same error: 'Flutter/Flutter.h' file not found

please help thanks

DenisovAV commented 1 month ago

Hi, you should unzip the files ios_debug_sim_unopt_arm64 and host_debug_unopt_arm64 to '/Users/me/code/apple-tv/flutter/out' folder and then update run_appletv.sh - export FLUTTER_LOCAL_ENGINE=/Users/me/code/apple-tv/flutter

jtkeyva commented 1 month ago

thank you.. buti am still getting the same error. i see this error in terminal:

DenisovAV commented 1 month ago

Are you trying with 3.24.1 ?

jtkeyva commented 1 month ago

yes thanks. but what is the engine folder? and the src folder? i don't understand what that is or how to get it?

DenisovAV commented 1 month ago

In my case 'engine' folder is root folder for everything, 'engine/src' is folder of source code of engine, 'engine/src/out' is folder for compiled engine. You don't need source code, but you need to have the same structure, so you need to unzip compiled engine to 'your_folder/out' and set up the path 'export FLUTTER_LOCAL_ENGINE=/Users/your_name/full_path/your_floder'

jtkeyva commented 1 month ago

thank you. i don't know why this is so hard for me to figure out. what engine are you talking about? is one of the zip files you had the compiled engine? or do i need to get the compiled engine from somewhere else?

here's what i am doing:

i download host_debug_unopt_arm64.zip and extract to /Users/me/flutter-apple-tv-test so there is /Users/me/flutter-apple-tv-test/host_debug_unopt_arm64

i download ios_debug_sim_unopt_arm64.zip and extact to /Users/me/flutter-apple-tv-test so there is /Users/me/flutter-apple-tv-test/ios_debug_sim_unopt_arm64

i download/clone flutter-tv and extract to /Users/me/flutter-apple-tv-test so i have /Users/me/flutter-apple-tv-test/flutter-tv

then i modify the script to FLUTTER_LOCAL_ENGINE=/Users/me/flutter-apple-tv-test/out'

am i missing something here? thanks!

DenisovAV commented 1 month ago

1) Extract host_debug_unopt_arm64.zip to /Users/me/flutter-apple-tv-test/out/ there will be /Users/me/flutter-apple-tv-test/out/host_debug_unopt_arm64 2) Extract ios_debug_sim_unopt_arm64.zip to /Users/me/flutter-apple-tv-test/out/ there will be /Users/me/flutter-apple-tv-test/out/ios_debug_sim_unopt_arm64 3) Clone flutter_tv to /Users/me/flutter-apple-tv-test there will be /Users/me/flutter-apple-tv-test/flutter-tv 4) Modify FLUTTER_LOCAL_ENGINE=/Users/me/flutter-apple-tv-test 5) Then run sh scripts/run_appletv.sh from Users/me/flutter-apple-tv-test/flutter-tv folder

jtkeyva commented 1 month ago

Perfect thank you, it works!

DenisovAV commented 1 month ago

Great! Good luck with your application

jtkeyva commented 1 month ago

Thank you