dart MacOS 10.15 Catalina 的Flutter问题

oipij1gg  于 2023-10-13  发布在  Mac
关注(0)|答案(4)|浏览(166)

更新到**MacOS 10.15 Catalina **后,Flutter出现问题。
具体来说,Flutter医生投诉如下:

下载的可执行文件不能在主机上执行。
未安装CocoaPods。

重要的是要解释,在更新之前,当我的电脑运行 * 莫哈韦10. 14 * 时,这些 * 与Flutter的问题并不存在 *,因此Flutter Doctor -v报告没有任何问题。
关于第一个问题:下载的可执行文件不能在主机上执行。
Flutter Doctor提供了以下链接:https://github.com/flutter/flutter/issues/6207
然而,链接的文章指的是 Linux,而不是 MacOS
关于第二个问题:未安装CocoaPods。
Flutter医生建议以下解决方案:

brew install cocoapods
pod设置

然而,尽管 “install cocoapods” 工作正常,但 “pod setup” 失败,表明以下错误:

/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.7.4/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.7.4/libexec/bin/pod: Undefined error: 0

运行flutter doctor -v提供以下结果:

[!] Flutter (Channel dev, v1.8.1, on Mac OS X 10.15 19A501i, locale es-PA)
    • Flutter version 1.8.1 at /Users/podriasereltuyo/flutter
    • Framework revision d3eee57c0b (7 days ago), 2019-07-08 11:04:24 -0700
    • Engine revision 3c51a7bfff
    • Dart version 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
MacBook-Air-de-Podria:ptyce podriasereltuyo$ flutter doctor -v
[!] Flutter (Channel dev, v1.8.1, on Mac OS X 10.15 19A501i, locale es-PA)
    • Flutter version 1.8.1 at /Users/podriasereltuyo/flutter
    • Framework revision d3eee57c0b (7 days ago), 2019-07-08 11:04:24 -0700
    • Engine revision 3c51a7bfff
    • Dart version 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/podriasereltuyo/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[✓] iOS tools - develop for iOS devices
    • ios-deploy 1.9.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

! Doctor found issues in 2 categories.

我谦卑地希望请求您的帮助,请,澄清它是什么意思,当它说下载的可执行文件不能在主机上执行
又如何解决呢?求你了
另外,如果cocoapods在使用莫哈韦10.14时运行得很好,那么现在的问题是什么,似乎无法成功运行pod setup
在升级到MacOS 10.15 Catalina Beta后,这里还有其他人有Flutter的任何问题吗?
谢谢!!!
更新.关于这个问题的研究,我遇到了一个非常可悲的评论,这表明,基本上没有支持在 Catalina 的Flutter.
请在这里找到:https://github.com/flutter/flutter/issues/34000
评论说:Flutter在macOS 10.15上尚不受支持,尽管我们显然正在关注它。这是#22598的副本,它与从 Catalina 删除32位支持有关。

  • 所以,我开始想,这可能是一个好主意,回到莫哈韦的安全,至少Flutter工作正常. *
    请分享您的想法,建议,建议?
vfh0ocws

vfh0ocws1#

它可以安装cocoapods,运行flutter build ios并在iOS模拟器上运行。

  • brew uninstall cocoapods
  • sudo gem install -n /usr/local/bin cocoapods
  • pod install

详细说明在这里:This terminal won't let me run or install cocoa pods because I am on MacOS Catalina Beta?

rqqzpn5f

rqqzpn5f2#

对于这个问题:
[!] Flutter(Channel dev,v1.7.11,on Mac OS X 10.15 19 A487 m,locale en-SE)[!] Flutter(Channel dev,v1.7.11,on Mac OS X 10.15 19 A487 m,locale en-SE)已下载的可执行文件无法在主机上执行。有关详细信息,请参阅https://github.com/flutter/flutter/issues/6207
简单修复:在MAC上打开一个终端并运行以下命令:

> flutter channel master

> flutter doctor

享受

oprakyz7

oprakyz73#

重新安装它(如果你使用的是homebrew)。
只要跑:

brew uninstall cocoapods && brew install cocoapods
bvn4nwqk

bvn4nwqk4#

例如:

[!] Flutter (Channel stable, 3.13.6, on macOS 13.4 22F66 darwin-x64, locale en-GB)
✗ Downloaded executables cannot execute on host.
  See https://github.com/flutter/flutter/issues/6207 for more information.

CocoaPods是Xcode项目的开源依赖管理器。当您为iOS开发移动的应用程序时,可以使用CocoaPods在一个简单的文本文件(称为Podfile)中定义所有依赖项
只是做:-

brew install cocoapods

相关问题