gpt4 book ai didi

ios - 无效的 `Podfile` 文件 : cannot load such file./flutter/packages/flutter_tools/bin/podhelper

转载 作者:行者123 更新时间:2023-12-05 00:45:28 34 4
gpt4 key购买 nike

升级flutter后尝试用模拟器测试flutter项目时,出现了这个错误。

Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running pod install... 1.1s
CocoaPods' output:

[!] Invalid `Podfile` file: cannot load such file -- /Volumes/WD /DEVELOPER/flutter/packages/flutter_tools/bin/podhelper.
# from /Volumes/WD/DEVELOPER/dont_forget/ios/Podfile:26
# -------------------------------------------
#
> require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
#
# -------------------------------------------
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:318:in `rescue in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:312:in `block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:310:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:310:in `from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0.beta.2/lib/cocoapods-core/podfile.rb:276:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/config.rb:205:in `podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/command/install.rb:46:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 11 Pro.
Exited (sigterm)

我尝试了 flutter cleanflutter build iOSrm iOS/Podfile,但它根本不起作用。我该如何解决这个问题?下面是我的 flutter doctorflutter --version

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.5 19F101, locale en-KR)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.48.1)
[✓] Connected device (1 available)

• No issues found!
Flutter 1.20.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision bbfbf1770c (10 days ago) • 2020-08-13 08:33:09 -0700
Engine • revision 9d5b21729f
Tools • Dart 2.9.1

最佳答案

从终端运行:

flutter clean

flutter 发布获取

pod install//cd 进入 ios 文件夹

关于ios - 无效的 `Podfile` 文件 : cannot load such file./flutter/packages/flutter_tools/bin/podhelper,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63544427/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com