美文网首页FlutterFlutter 开发那些事
Flutter 踩坑🕳️ 记,持续更新~

Flutter 踩坑🕳️ 记,持续更新~

作者: _白羊 | 来源:发表于2019-04-12 10:06 被阅读0次

用这个包 agora_rtc_engine之后,IOS模拟器跑不起来了😢,报错如下:

➜ pika git:(zxs-dev) ✗ flutter run

Launching lib/main.dart on iPhone XR in debug mode...

Running pod install... 0.9s

CocoaPods' output:

↳

 Preparing

 Analyzing dependencies

 Inspecting targets to integrate

 Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

 Finding Podfile changes

 - Flutter

 - agora_rtc_engine

 - city_pickers

 - connectivity

 - fluttertoast

 - image_picker

 - permission_handler

 - screen

 - shared_preferences

 Fetching external sources

 -> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`

 -> Fetching podspec for `agora_rtc_engine` from `.symlinks/plugins/agora_rtc_engine/ios`

 -> Fetching podspec for `city_pickers` from `.symlinks/plugins/city_pickers/ios`

 -> Fetching podspec for `connectivity` from `.symlinks/plugins/connectivity/ios`

 -> Fetching podspec for `fluttertoast` from `.symlinks/plugins/fluttertoast/ios`

 -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`

 -> Fetching podspec for `permission_handler` from `.symlinks/plugins/permission_handler/ios`

 -> Fetching podspec for `screen` from `.symlinks/plugins/screen/ios`

 -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`

 Resolving dependencies of `Podfile`

 [!] CocoaPods could not find compatible versions for pod "AgoraRtcEngine_iOS":

 In snapshot (Podfile.lock):

 AgoraRtcEngine_iOS (= [2.4.0.1](2.4.0.1))

 In Podfile:

 agora_rtc_engine (from `.symlinks/plugins/agora_rtc_engine/ios`) was resolved to 2.4.0, which depends on

 AgoraRtcEngine_iOS (= [2.4.0.1](2.4.0.1))

 None of your spec sources contain a spec satisfying the dependency: `AgoraRtcEngine_iOS (= [2.4.0.1](2.4.0.1))`.

 You have either:

 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.

 * mistyped the name or version.

 * not added the source repo that hosts the Podspec to your Podfile.

 Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in

 `raise_error_unless_state'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in

 unwind_for_conflict'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in

 `unwind_for_conflict'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in

 `process_topmost_state'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/resolver.rb:123:in `resolve'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:781:in `block

 in resolve_dependencies'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:779:in

 `resolve_dependencies'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer/analyzer.rb:88:in

 `analyze'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:243:in `analyze'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:154:in `block in

 resolve_dependencies'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:153:in

 `resolve_dependencies'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:116:in `install!'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/bin/pod:22:in `load'

 /usr/local/Cellar/cocoapods/1.5.3_1/libexec/bin/pod:22:in `<main>'

Error output from CocoaPods:

↳

 [!] The version of CocoaPods used to generate the lockfile (1.6.1) is higher than the version of the current

 executable (1.5.3). Incompatibility issues may arise.

 [!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified.

 Please specify a platform for this target in your Podfile. See

 `[https://guides.cocoapods.org/syntax/podfile.html#platform](https://guides.cocoapods.org/syntax/podfile.html#platform)`.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.

To update the CocoaPods specs, run:

 pod repo update

Error running pod install

Error launching application on iPhone XR.

😄 解决方法:升级一下pod就行了
1、命令行输入 pod repo update
2、进入项目的IOS目录,运行命令 pod install


如果不希望 Column 撑满容器: mainAxisSize: MainAxisSize.min


用命令创建 Flutter 项目(据说这样创建的项目比较完整,这样说会不会被打😱)
flutter create --org=包名 --project-name=项目文件的名字 文件路径,例如:

// 会在当前目录,创建一个 demo 文件夹,flutter项目名称为 demo,包名 cn.demotech.demo
flutter create --org=cn.demotech --project-name=demo ./demo

其余配置信息可以通过 flutter create -h命令查看,自行配置

相关文章

网友评论

    本文标题:Flutter 踩坑🕳️ 记,持续更新~

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