美文网首页
Flutter 踩坑:Proxy Configuration !

Flutter 踩坑:Proxy Configuration !

作者: 九九丸子 | 来源:发表于2020-04-26 12:13 被阅读0次

Mac 更新系统(10.15.4)以后 cocopod 不好用了 ,连累 Flutter 项目也遇到问题。

运行 flutter docter,提示需要重新安装 cocopod:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.4
    19E287, locale zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 11.4)
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from
        the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods. For more info, see
        https://github.com/flutter/flutter/issues/14293.
      To re-install CocoaPods, run:
        sudo gem install cocoapods
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.2)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.
➜  flutter git:(stable) ✗ 

按照提示运行 sudo gem install cocoapods,重新安装 cocopod 成功以后,再次运行 flutter docter:

➜  flutter git:(stable) ✗ flutter doctor                                                                   
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.2)
[!] Proxy Configuration
    ! NO_PROXY is not set
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

又提示 Proxy 配置问题,[!] Proxy Configuration ! NO_PROXY is not set,搜了一下按照这个 issue:https://github.com/flutter/flutter/issues/41034 增加
export NO_PROXY=localhost,127.0.0.1 这一行到 bash_profile 文件就好了。

我手动添加到 bash_profile 最后一行:

Snip20200426_2.png
保存成功以后再次运行 flutter doctor,问题解决。
➜  ~ flutter doctor 
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.4 19E287, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.6)
[✓] VS Code (version 1.44.2)
[✓] Proxy Configuration
[✓] Connected device (2 available)

• No issues found!

相关文章

  • Flutter 踩坑:Proxy Configuration !

    Mac 更新系统(10.15.4)以后 cocopod 不好用了 ,连累 Flutter 项目也遇到问题。 运行 ...

  • Flutter 开发记录

    Flutter 开发踩坑记录(干货总结)

  • flutter问题记录

    Flutter踩坑 Packages get 失效 在 flutter 官网学习教程[https://flutte...

  • flutter-Mac系统下安装之export PATH=`pw

    .踩坑 在执行export PATH=pwd/flutter/bin:$PATH命令的时候踩了一会儿坑,按教程执行...

  • flutter、Oc混编

    踩坑: 1. 为什么非得把flutter项目克隆下来,才能集成? flutter 用的是flutter modul...

  • flutter使用fishredux管理数据后自定义TabCon

    flutter使用fishredux管理数据后自定义TabController flutter小白踩坑记。学习fl...

  • Flutter踩坑

    前言:首先说明下,这个总结并非把flutter完完整整的api全部总结一遍,网上有很多资料。比如flutter中文...

  • flutter踩坑

    1. 三方库使用: https://pub.dev/ 这上面有丰富的flutter三方库及评分 2. 图片设置格...

  • Flutter踩坑

    1.在Android Studio 上Android项目混编Flutter 按照官方文档 https://gith...

  • Flutter 踩坑

    这是一个老iOS项目,再接入flutter途中报错记录及解决方案 1./packages/flutter_tool...

网友评论

      本文标题:Flutter 踩坑:Proxy Configuration !

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