Android没有找到cocoapods,尽管它是通过brew install coocapods
正确安装在系统中的。Android控制台看起来没有得到正确的路径。
注意:通过终端/ iTerm启动Android
open /Applications/Android\ Studio.app
解决了这个问题后,Android就找到了正确的路径。但是我想知道如何将相同的结果直接从应用程序目录/聚光灯搜索中存档?为什么Android不解决正确的路径?
Android版本2021.1.1,macOS
点击“颤振医生”后,控制台输出:
/Users/[...]/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale de-DE)
• Flutter version 2.8.1 at /Users/[...]/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/[...]/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
✗ 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 see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
...
在Android中启动终端或启动iTerm,输出:
flutter doctor -v
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale de-DE)
• Flutter version 2.8.1 at /Users/[...]/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (6 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/[...]/Library/Android/sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
...
发布于 2022-02-04 20:29:54
修正了安卓工作室大黄蜂2021.1.1.1.21补丁1的Mac。
发布于 2022-02-04 19:28:38
我刚刚为Mac安装了最新的ANDROID工作室大黄蜂2021.1.1.1.21修补程序1。我加载了一个旧的颤振应用程序,并运行,(从运行箭头在IDE),它对一个iPhone 8模拟器设备。CocoaPods错误没有出现,应用程序在模拟器设备中启动。在我看来,这个更新已经修复了这个错误。
发布于 2022-02-02 10:12:43
@scrimau写了关于这个问题最好的描述。
以下是一些进一步的信息:
echo $PATH
(使用Android的终端)根据这两种方法中用于启动Android的哪种方法产生不同的结果。
在两个echo $PATH
结果中都会出现相同的目录,但是目录会被左右移动。
似乎目录的顺序(如echo $PATH
所示)可能与不同的行为有关。
(对不起:这应该是个评论。我找不到办法改变评论的答案。下一次我会更加小心。)
https://stackoverflow.com/questions/70895243
复制