gpt4 book ai didi

ios - 无效的 `Podfile` 文件 : cannot load such file -- ⁨path/to/. ios/Flutter/podhelper.rb

转载 作者:行者123 更新时间:2023-11-29 11:26:50 25 4
gpt4 key购买 nike

我正在尝试将 flutter 模块集成到现有的 iOS 应用中

我的 pod 文件:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'


target 'IosFlutter' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for IosFlutter

target 'IosFlutterTests' do
inherit! :search_paths
# Pods for testing
end

target 'IosFlutterUITests' do
inherit! :search_paths
# Pods for testing
end

flutter_application_path = '⁨⁨path/to/flutter_app⁩/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

end

在终端中运行 pod install 时出现此错误:

Invalid `Podfile` file: cannot load such file -- path/to/.ios/Flutter/podhelper.rb

任何建议将不胜感激,谢谢

最佳答案

  • 确保你的 flutter 和 dart 版本是最新的
  • 运行 flutter doctor 查看是否有问题
  • 将您的 flutter 文件从目标 block 中加载出来,并将 install_all_flutter_pods 添加到您的应用程序依赖 block 中,如下所示:

    flutter_application_path = '⁨⁨path/to/flutter_app⁩/'
    load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

    target 'MyApp' do

    install_all_flutter_pods(flutter_application_path)

    end

最后在终端 ios 应用程序根文件夹中运行 pod install

关于ios - 无效的 `Podfile` 文件 : cannot load such file -- ⁨path/to/. ios/Flutter/podhelper.rb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57955426/

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