未在ios目录中创建Flutter Podfile和Pods文件夹 [英] Flutter Podfile and Pods folders not created in ios directory

查看:161
本文介绍了未在ios目录中创建Flutter Podfile和Pods文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用向导从Android Studio创建了一个新的flutter项目.

Created a new flutter project from Android Studio using the wizard.

新创建的项目文件夹在ios目录中没有任何Pods文件夹或podfile.

Newly created project folder does not have any of the Pods folders or podfile in the ios directory.

此Flutter.io 页面状态(强调我的意思):

This Flutter.io page states (emphasis mine):

尽管Flutter项目的iOS文件夹中有一个Podfile , 仅在添加所需的本机依赖项时使用此选项 每个平台的集成.

While there is a Podfile in the iOS folder in your Flutter project, only use this if you are adding native dependencies needed for per-platform integration.

我的ios目录中根本没有podfile.

There is no podfile at all in my ios directory.

我在另一个问题中发现此评论,建议在ios模拟器上运行该项目会生成文件,但正在运行sim和设备上的项目都不会为我创建任何podfile.

I found this comment in a different question here suggesting running the project on the ios simulator would generate the file but running the project on the sim and device both do not result in any podfile creation for me.

在我错过的新flutter项目创建的ios方面是否有一些步骤?没有podfile,我无法添加特定于ios的依赖项.

Is there some step in the ios side of the new flutter project creation that I missed? There's no way for me to add ios-specific dependencies without the podfile.

flutter doctor的输出:

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.12.6 16G1408, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.1)
[!] VS Code (version 1.25.1)
[✓] Connected devices (1 available)

推荐答案

运行flutter build ios后,将在ios目录中为您创建PodfilePodfile.lock.

Once you run flutter build ios a Podfile and Podfile.lock will be created for you in the ios directory.

请遵循部署步骤官方文档中的步骤.

Follow the steps in the deploy steps official documentation.

这篇关于未在ios目录中创建Flutter Podfile和Pods文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆