美文网首页flutter
iOS 接入Flutter报错 Invalid `Podfile

iOS 接入Flutter报错 Invalid `Podfile

作者: super_2e20 | 来源:发表于2021-03-11 14:29 被阅读0次
我们是依照flutter官方文档接入的
  1. Add the following lines to your Podfile:

    content_copy

    flutter_application_path = '../my_flutter'
    load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
    
    
  2. For each Podfile target that needs to embed Flutter, call install_all_flutter_pods(flutter_application_path).

    content_copy

    target 'MyApp' do
      install_all_flutter_pods(flutter_application_path)
    end
    
    
  3. Run pod install.
    咿呀报错了

    image.png
pod之后报错
[!] Invalid `Podfile` file: cannot load such file -- /Users/sun/AndroidStudioProjects/flutter_app/.ios/Flutter/podhelper.rb.
解决方案

解决方法:

1、首先进入到flutter的文件下:输入flutter clean。

2、执行完成后输入:flutter pub upgrade。

3、最后回到项目中重写pod install一下就可以了。

相关文章

网友评论

    本文标题:iOS 接入Flutter报错 Invalid `Podfile

    本文链接:https://www.haomeiwen.com/subject/bjanqltx.html