【问题标题】:Invalid `Podfile` file: cannot load such file -- ⁨path/to/.ios/Flutter/podhelper.rb无效的 `Podfile` 文件:无法加载此类文件 -- path/to/.ios/Flutter/podhelper.rb
【发布时间】:2020-01-17 04:58:00
【问题描述】:

我正在尝试将 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

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

【问题讨论】:

    标签: ios xcode flutter cocoapods


    【解决方案1】:
    • 确保你的颤振和飞镖版本是最新的
    • 运行 flutter doctor 看看是否有问题
    • 从目标块中加载你的flutter文件,并在你的应用依赖块中添加 install_all_flutter_pods ,如下所示:

      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

    【讨论】:

      猜你喜欢
      • 2021-10-10
      • 1970-01-01
      • 2015-08-16
      • 1970-01-01
      • 1970-01-01
      • 2016-11-20
      • 2023-03-10
      • 2015-11-20
      • 1970-01-01
      相关资源
      最近更新 更多