如何解决这个问题?错误(xcode):找不到框架

发布于 2025-01-29 15:28:20 字数 6470 浏览 4 评论 0原文

如何解决这个问题? 错误(Xcode):找不到flutter

我尝试使用更多方法,

试图删除iOS然后pod install ...

试图

创建新项目等。

但是仍然无法解决。

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
/Users/pin-chientseng/Desktop/yomate/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 56 / JSON error:
JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
Xcode build done.                                           221.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle

    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    warning: Stale file '/Users/pin-chientseng/Desktop/yomate/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist' is
    located outside of the allowed root paths.

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-input-files-37e3c74e
    61b246db180ac6f1b6f5519a-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-input-files-6f17fb4
    132a6c963427e5fd8c0f46475-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-output-files-2b94b0
    84fd7edee03f689887bc427bd3-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-output-files-3dbe4
    531b144e8e556eea6741f7e46e6-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-5F0225AF943341352A9BA345.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-678E497CE5823DAA4909D0F3.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-69D48C77EE5D169DAA62588C.sh'

    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'FMDB' from project 'Pods')
    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'leveldb-library' from project 'Pods')

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle


Error (Xcode): Framework not found Flutter


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

”在此处输入图像描述”

如果我使用了此方法,

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
      end
    end
  end
end

我会得到此错误...

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install...                                             38.2s
Running Xcode build...                                                  
Xcode build done.                                           28.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle

    /Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages
    .g.m:7:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle


Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages.g.m
:6:8


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

How can solve this issues? Error (Xcode): Framework not found Flutter

I tried to more methods,

tried to delete ios then pod install...

tried to flutter clean...

tried to create new project etc.

but still cannot solve.

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
/Users/pin-chientseng/Desktop/yomate/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 56 / JSON error:
JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
Xcode build done.                                           221.1s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle

    ld: framework not found Flutter
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    warning: Stale file '/Users/pin-chientseng/Desktop/yomate/build/ios/Debug-iphonesimulator/Runner.app/GoogleService-Info.plist' is
    located outside of the allowed root paths.

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-input-files-37e3c74e
    61b246db180ac6f1b6f5519a-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/InputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-input-files-6f17fb4
    132a6c963427e5fd8c0f46475-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-5F0225AF943341352A9BA345-Pods-Runner-resources-Debug-output-files-2b94b0
    84fd7edee03f689887bc427bd3-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/OutputFileList-678E497CE5823DAA4909D0F3-Pods-Runner-frameworks-Debug-output-files-3dbe4
    531b144e8e556eea6741f7e46e6-resolved.xcfilelist'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-5F0225AF943341352A9BA345.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-678E497CE5823DAA4909D0F3.sh'

    note: Removed stale file
    '/Users/pin-chientseng/Library/Developer/Xcode/DerivedData/Runner-bfllcubjuppngacurzilkdnplylp/Build/Intermediates.noindex/Runner
    .build/Debug-iphonesimulator/Runner.build/Script-69D48C77EE5D169DAA62588C.sh'

    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'FMDB' from project 'Pods')
    /Users/pin-chientseng/Desktop/yomate/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target
    'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target
    'leveldb-library' from project 'Pods')

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.hhxYin/flutter_ios_build_temp_dirsANWae/temporary_xcresult_bundle


Error (Xcode): Framework not found Flutter


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

enter image description here

enter image description here

if I used this methods,

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if Gem::Version.new('8.0') > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
      end
    end
  end
end

i will got this error...

Launching lib/main.dart on iPhone 13 Pro Max in debug mode...
Running pod install...                                             38.2s
Running Xcode build...                                                  
Xcode build done.                                           28.7s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle

    /Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages
    .g.m:7:9: fatal error: 'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>
            ^~~~~~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/rg/v6d4v6m545949bhd3pv5555r0000gn/T/flutter_tools.gk0YEl/flutter_ios_build_temp_dirWL743Q/temporary_xcresult_bundle


Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/pin-chientseng/Development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.4/ios/Classes/messages.g.m
:6:8


Could not build the application for the simulator.
Error launching application on iPhone 13 Pro Max.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

绝對不後悔。 2025-02-05 15:28:20

就我而言,在删除了乱七八糟的实例之后,我在尝试清理我的258GO MacBook上的一些存储以更新Xcode :(,我可能删除了flutter.flutter.framework。

此处给出的解决方案并没有更改任何内容我。

包括吊舱命令,因为它错过了iOS工具,可以使用Flutter Pretache下载。

我尝试清理吊舱中的所有内容, 是:

cd ios
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
flutter precache --ios
pod install

我希望这种解决方案将帮助某人,并阻止他们像对我一样失去一整天的工作。

In my case, I got this error after deleting the flutter instances while trying to clean up some storage on my 258go macbook to update Xcode :(, in doing so I probably deleted the flutter.framework.

The solutions given here have not changed anything for me.

So I tried to clean up everything in the pod, including the cache. The pod install command failed because it missed the ios tools, which can be downloaded with flutter precache --ios.

So the complete process to solve this problem for me was :

cd ios
pod cache clean --all
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
flutter precache --ios
pod install

I hope that this solution will help someone and prevent them from losing a whole day's work as it did for me.

心的位置 2025-02-05 15:28:20

在这些步骤中解决了相同的问题:

  1. flutter升级
  2. flutter Clean
  3. flutter Run

Solved the same problem with these steps:

  1. flutter upgrade
  2. flutter clean
  3. flutter run
默嘫て 2025-02-05 15:28:20

我尝试了许多解决方案来解决此错误。唯一可能的解决方案是删除扑动路径中的颤动文件夹,然后重新副本扑朔迷离文件夹。

这解决了我的错误。

I have tried many solutions for this error. The only possible solution is to delete the flutter folder in the FLUTTER PATH, and re-copy the flutter folder.

This solved my error.

眼眸里的那抹悲凉 2025-02-05 15:28:20

重命名项目并更改捆绑包后,我遇到了相同的错误。
修复了它:

cd ios
pod cache clean --all
flutter clean
flutter pub get

I had the same error after renaming the project and changing bundleId.
Fixed it:

cd ios
pod cache clean --all
flutter clean
flutter pub get
孤芳又自赏 2025-02-05 15:28:20

我已经尝试了所有答案,唯一对我有用的是去除颤音并重新安装它。

I have tried all the answers, the only thing worked for me was to remove Flutter and reinstall it again.

季末如歌 2025-02-05 15:28:20

找不到FMDB Framework的问题与Cocoapods中的错误有关。

您可以通过编辑pods-runner-frameworks.sh脚本:

替换:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink "${source}")"
fi

with:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink -f "${source}")"
fi

请注意。

可以存档并上传您的应用程序。

That problem of not finding FMDB framework is related to a bug in Cocoapods.

You can solve by it editing the Pods-Runner-frameworks.sh script:

Replace:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink "${source}")"
fi

with:

if [ -L "${source}" ]; then
  echo "Symlinked..."
  source="$(readlink -f "${source}")"
fi

Note that -f was added.

Then you can archive it and upload your app.

拥抱影子 2025-02-05 15:28:20

我正在清洁Mac上的数据存储并清除Xcode Cache,这就是为什么出现此问题的原因。
我的项目中有稳定的Flutter 3.0.0版本,最后版本有问题
因此,我的解决方案是

  1. 颤抖的升级(等等.....)
  2. 扑面降级
  3. flutter pub get

I was cleaning data storage on my mac and cleared xcode cache, that's why this problem appeared.
I had stable Flutter 3.0.0 version in my projects and have problems with last version
So my solution was

  1. flutter upgrade (wait .....)
  2. flutter downgrade
  3. flutter pub get
醉态萌生 2025-02-05 15:28:20

我已经通过添加share_plus:pubspec.yaml文件修复了它

I have fixed it by adding share_plus: to pubspec.yaml file

帅冕 2025-02-05 15:28:20

我也有这个错误,就我的情况而言,我在pubspec.yaml中的删除依赖项后有错误:

flutter 'Error (Xcode): Framework not found OrderedSet'

是通过project.pbxproj中的find'ordereDedset修复了它。

"-framework",
"\"OrderedSet\"",

我 。

I have this error too, in my case I have error after delete dependencies in pubspec.yaml:

flutter 'Error (Xcode): Framework not found OrderedSet'

I fix it by find ‘OrderedSet’ in project.pbxproj and delete

"-framework",
"\"OrderedSet\"",

enter image description here

扮仙女 2025-02-05 15:28:20

1- Flutter频道Beta
2-颤抖的升级
3-扑来奔跑
4-扑面通道稳定
5-颤抖的升级
6-扑面跑

1- flutter channel beta
2- flutter upgrade
3- flutter run
4- flutter channel stable
5- flutter upgrade
6- flutter run

流绪微梦 2025-02-05 15:28:20

在试图释放硬盘上的空间时,我也遇到了同样的问题。
我通过执行以下操作解决了这个问题:

  flutter通道beta 
颤抖的升级
扑面而来
扑向通道稳定
颤抖的升级 
扑面而来
 

I had the same issue while trying to free up space on my hard drive.
I solved this problem by doing the following:

flutter channel beta 
flutter upgrade
flutter run
flutter channel stable
flutter upgrade 
flutter run
云胡 2025-02-05 15:28:20

对我来说,解决方案是重新安装颤音。

我使用FVM进行版本控制。

fvm remove {your-flutter-version}
fvm install {your-flutter-version}
fvm flutter clean; fvm flutter pub get

在您的应用程序的根目录中。

cd ios
rm -rf .symlinks
rm -rf Pods
rm -f Podfile.lock
pod install --repo-update

这应该有帮助。

The solution for me was to reinstall Flutter.

I use FVM for versioning.

fvm remove {your-flutter-version}
fvm install {your-flutter-version}
fvm flutter clean; fvm flutter pub get

In the root directory of your app.

cd ios
rm -rf .symlinks
rm -rf Pods
rm -f Podfile.lock
pod install --repo-update

This should help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文