美文网首页
记iOS集成Flutter遇到的问题

记iOS集成Flutter遇到的问题

作者: 火箭Ronnie | 来源:发表于2020-05-13 14:05 被阅读0次


    Mac安装Flutter就不多说了,本文主要针对集成时候遇到的问题

    1.cocoapods

    网上看到的大部分文章引入方式为

    flutter_application_path = '../my_flutter/'

    eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)

    之后执行pod intall。在这一步尝试了不下10次,每次pod install成功执行,但是Flutter并没有引入到工程中来。。。查看官方文档才发现修改了引入方式

    flutter_application_path = '../my_flutter/'

    load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

    install_all_flutter_pods(flutter_application_path)

    2.Command PhaseScriptExecution failed with a nonzero exit code

    3 pod No podspec found for `Flutter` in `../my_flutter/.ios/Flutter/engine`

    cd my_flutter文件夹,终端中执行 flutter run

    4.building for is simulator but the linked and embedded framework 'app.framework' was built for ios

    1)删除.ios/flutter/app.framework

    2) 重新 flutter run 编译运行

    相关文章

      网友评论

          本文标题:记iOS集成Flutter遇到的问题

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