1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter/Flutter.h file not found and other file-not-found errors from cached...

Discussão em 'Mobile' iniciado por Stack, Outubro 17, 2024 às 10:53.

  1. Stack

    Stack Membro Participativo

    I'm encountering multiple file-not-found errors in Xcode when trying to build my Flutter project for iOS. The primary issue seems to be with Flutter/Flutter.h not being found, followed by several other errors related to cached libraries such as sqflite, package_info_plus, and geocoding_ios.

    This issue has occurred in a loop multiple times. I’ve tried several solutions, including:

    • Running flutter clean
    • Reinstalling Flutter dependencies with flutter pub get
    • Updating to the latest Flutter SDK
    • Removing and recreating the iOS build folder (ios/)
    • Verifying Xcode is updated and all necessary command-line tools are installed.

    Here's a snippet of the errors:


    Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/.pub-cache/hosted/pub.dev/sqflite-2.3.0/ios/Classes/SqfliteImport.h:10:8

    Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found /Users/.pub-cache/hosted/pub.dev/package_info_plus-4.1.0/ios/Classes/FLTPackageInfoPlusPlugin.h:4:8

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/geocoding_ios-2.3.0/ios/Classes/GeocodingHandler.h: No such file or directory

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/geocoding_ios-2.3.0/ios/Classes/Extensions/CLPlacemarkExtensions.h: No such file or directory

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/sqflite-2.3.0/ios/Classes/SqfliteDatabase.h: No such file or directory

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/sqflite-2.3.0/ios/Classes/SqflitePlugin.h: No such file or directory

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/sqflite-2.3.0/ios/Classes/SqfliteOperation.h: No such file or directory

    Error (Xcode): /Users/.pub-cache/hosted/pub.dev/sqflite-2.3.0/ios/Classes/SqfliteImport.h: No such file or directory

    Could not build the application for the simulator. Error launching application on iPhone 15.

    I expected these steps to resolve the build errors, but they keep reoccurring. How can I permanently fix this issue and prevent it from happening repeatedly?

    Environment

    Flutter SDK path: /Users/sdk/flutter/bin/flutter

    Project path: /Users/vedic/vedicconnect_user/ios/Runner.xcodeproj

    Flutter version: 3.24.3

    Dart 3.5.3

    What am I missing in the setup, or is there a specific step to ensure the cached libraries are properly integrated into the iOS build process?

    Continue reading...

Compartilhe esta Página