简体   繁体   English

Codemagic iOS 构建问题

[英]Codemagic iOS build issue

I am trying to compile my app with Codemagic for iOS .我正在尝试使用Codemagic for iOS编译我的应用程序。 Locally, my environment is:在本地,我的环境是:

[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18363.657], locale en-US) [√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18363.657], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Android 工具链 - 为 Android 设备开发(Android SDK 版本 28.0.3)

[√] Android Studio (version 3.5) [√] Android Studio(3.5版)

I have no issue to compile to Android app.我没有问题可以编译为Android应用程序。 However, when I switch to Codemagic , and I setup my config to:但是,当我切换到Codemagic 时,我将配置设置为:

Flutter 1.9.1+hotfix.6
Xcode 11.1

I have the following error reported:我报告了以下错误:

Compiler message:
lib/app/ui/widgets/color_theme_picker_widget.dart:2:8: Error: Error when reading '../programs/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_colorpicker-0.3.2/lib/block_picker.dart': No such file or directory

import 'package:flutter_colorpicker/block_picker.dart';
       ^
lib/app/ui/widgets/color_theme_picker_widget.dart:35:28: Error: Method not found: 'BlockPicker'.
                    child: BlockPicker(
                           ^^^^^^^^^^^
lib/app/ui/widgets/color_theme_picker_widget.dart:35:28: Error: The method 'BlockPicker' isn't defined for the class 'ColorThemePicker'.
 - 'ColorThemePicker' is from 'package:biorhythms/app/ui/widgets/color_theme_picker_widget.dart' ('lib/app/ui/widgets/color_theme_picker_widget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'BlockPicker'.

I would appreciate any feedback, Thanks!我将不胜感激任何反馈,谢谢!

In case someone came across a similar issue - in my case, it was caused by the following line in my pubspec.yaml file - flutter_colorpicker: any , since it loads the most recent flutter_colorpicker version, where the above file has been removed.如果有人遇到类似的问题 - 在我的情况下,它是由我的pubspec.yaml文件中的以下行引起的 - flutter_colorpicker: any ,因为它加载了最新的flutter_colorpicker版本,其中上述文件已被删除。 SO basically, I had to adjust the code to the most recent version.所以基本上,我不得不将代码调整到最新版本。 Also as a general thumb rule - just set your plugin / package version to a specific one eg flutter_colorpicker: ^0.3.2 .同样作为一般经验法则 - 只需将您的插件/包版本设置为特定版本,例如flutter_colorpicker: ^0.3.2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM