首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >颤振警告(CocoaPods未安装跳舱安装)

颤振警告(CocoaPods未安装跳舱安装)
EN

Stack Overflow用户
提问于 2021-07-19 19:45:26
回答 10查看 17.3K关注 0票数 12

我试图在Android上构建一个带有Geolocator插件的颤振应用程序。当我运行该应用程序时,我有以下警告--这会阻止应用程序运行:

警告: CocoaPods未安装。跳舱安装。CocoaPods用于检索iOS和macOS平台端的插件代码,以响应您在Dart端的插件使用。没有CocoaPods,插件将无法在iOS或macOS上工作。有关更多信息,请参见https://flutter.dev/platform-plugins以安装,参见https://guides.cocoapods.org/using/getting-started.html#installation获取说明。 异常: CocoaPods未安装或未处于有效状态。

我尝试了我在互联网上找到的每一个解决方案(Stackoverflow & GitHub),但似乎都没有效果。

重要:当我试图从Xcode而不是从Android运行这个应用程序时,我遇到了以下错误:

沙箱与Podfile.lock不同步。运行'pod安装‘或更新您的CocoaPods安装。

因此,我所做的是-将目录更改为ios (在颤振项目上)并运行:

代码语言:javascript
复制
pod init
pod install

试图再次从Xcode中运行,它运行得非常完美。在Xcode上运行之后,我尝试从Android运行它,同样的错误也发生在我身上,阻止了应用程序的启动。

颤栗博士:

代码语言:javascript
复制
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale en-IL)
    • Flutter version 2.2.2 at /Users/idanrefaeli/Developer/flutter
    • Framework revision d79295af24 (5 weeks ago), 2021-06-11 08:56:01 -0700
    • Engine revision 91c9fc8fe0
    • Dart version 2.13.3

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/idanrefaeli/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5.1, Build version 12E507
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.57.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.23.0

[✓] Connected device (2 available)
    • Idan’s (mobile) • 00008020-0011092101A2002E • ios            • iOS 14.6
    • Chrome (web)    • chrome                    • web-javascript • Google Chrome 91.0.4472.114

! Doctor found issues in 1 category.

额外日志:在Android中的“Run”日志: pastebin.com/7iYtdcTQ也是在运行'pod‘之后的这个终端日志:pastebin.com/1 1cCNuFYM

-更新--

我终于能够运行这个应用程序了,我所做的就是从零开始将所有的项目文件复制到一个新的项目中,并且成功了。也许这是由于某种冲突,因为我引进了别人的项目(从安吉拉余的颤音乌德米课程)。无论如何,我仍然没有找到解决这个欺诈问题的办法,所以如果有人认出了什么,那就太好了!

EN

回答 10

Stack Overflow用户

发布于 2022-01-27 09:23:42

在应用程序终端中打开模拟器后编写

颤振运行

在终点站

或者关闭Android,打开终端并粘贴

开放/应用程序/Android\ Studio.app

它将打开Android,您可以正常运行

票数 20
EN

Stack Overflow用户

发布于 2022-02-01 11:40:52

此错误在更新后开始出现在mac os中。

代码语言:javascript
复制
Android Studio Bumblebee | 2021.1.1
Build #AI-211.7628.21.2111.8092744, built on January 19, 2022
Runtime version: 11.0.11+0-b60-7590822 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.0.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: com.bloc.intellij_generator_plugin (3.3.0), Dart (211.7798), andrasferenczi.dart-data-plugin (0.2.0), com.thoughtworks.gauge (211.6693.111), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), io.flutter (63.2.2), org.intellij.plugins.markdown (211.7142.37)

在我的例子中,它使用vs代码启动项目,或者使用命令flutter run运行项目。

安卓金丝雀上一个版本解决了问题

Update:正如Ascot所提到的,AndroidStudioBumblebeeco2021.1.1修补程序1解决了问题

票数 11
EN

Stack Overflow用户

发布于 2022-02-08 07:16:50

代码语言:javascript
复制
// uninstall
sudo gem uninstall cocoapods
brew uninstall cocoapods

// reinstall
sudo gem install cocoapods
pod setup

// rebuild
flutter build ios

然后,重新启动vscode和iTerm (这很重要),并进行调试。

票数 9
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68446186

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档