在我的 flutter 项目中运行 pod update 后,我的项目无法为 iO 编译。那是我已经尝试过的。
将代码粘贴到新的 Podfile 并再次运行 Pod istall。
$ flutter 医生-v
[✓] Flutter (Channel dev, v1.2.1, on Mac OS X 10.14.3 18D109, locale de-DE) • Flutter version 1.2.1 at /Users/mainuser/Development/flutter • Framework revision 8661d8aecd (3 days ago), 2019-02-14 19:19:53 -0800 • Engine revision 3757390fa4 • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/alexanderwilke/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01) • All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.1, Build version 10B61 • ios-deploy 1.9.4 • CocoaPods version 1.6.0
[✓] Android Studio (version 3.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 32.0.1 • Dart plugin version 182.5215 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] VS Code (version 1.31.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.23.0
[!] Connected device ! No devices available
Error Output:
Running pod install... 4,7s
> Xcode build done. 3,6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
> Xcode's output:
↳
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:29:50: warning: 'window' is only available on iOS 5.0 or newer
[-Wunguarded-availability]
[UIApplication sharedApplication].delegate.window.rootViewController;
^~~~~~
In module 'UIKit' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:398:51: note: 'window' has been explicitly
marked partial here
@property (nullable, nonatomic, strong) UIWindow *window NS_AVAILABLE_IOS(5_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:29:50: note: enclose 'window' in an @available check to silence this warning
[UIApplication sharedApplication].delegate.window.rootViewController;
^~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:79:45: warning: 'kUTTypeAVIMovie' is only available on iOS 8.0 or newer
[-Wunguarded-availability]
(NSString *)kUTTypeMovie, (NSString *)kUTTypeAVIMovie, (NSString *)kUTTypeVideo,
^~~~~~~~~~~~~~~
In module 'MobileCoreServices' imported from /Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:7:
In module 'CoreServices' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/MobileCoreServices.framework/Headers/MobileCoreServices.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/CoreServices.framework/Headers/UTCoreTypes.h:892:26: note: 'kUTTypeAVIMovie' has been
explicitly marked partial here
extern const CFStringRef kUTTypeAVIMovie __OSX_AVAILABLE_STARTING(__MAC_10_10,__IPHONE_8_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:79:45: note: enclose 'kUTTypeAVIMovie' in an @available check to silence this
warning
(NSString *)kUTTypeMovie, (NSString *)kUTTypeAVIMovie, (NSString *)kUTTypeVideo,
^~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:111:22: warning: 'presentViewController:animated:completion:' is only available on
iOS 5.0 or newer [-Wunguarded-availability]
[_viewController presentViewController:_imagePickerController animated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h:227:1: note:
'presentViewController:animated:completion:' has been explicitly marked partial here
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:111:22: note: enclose 'presentViewController:animated:completion:' in an @available
check to silence this warning
[_viewController presentViewController:_imagePickerController animated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:124:20: warning: 'presentViewController:animated:completion:' is only available on
iOS 5.0 or newer [-Wunguarded-availability]
[_viewController presentViewController:_imagePickerController animated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h:227:1: note:
'presentViewController:animated:completion:' has been explicitly marked partial here
- (void)presentViewController:(UIViewController *)viewControllerToPresent animated: (BOOL)flag completion:(void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:124:20: note: enclose 'presentViewController:animated:completion:' in an @available
check to silence this warning
[_viewController presentViewController:_imagePickerController animated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:131:27: warning: 'dismissViewControllerAnimated:completion:' is only available on
iOS 5.0 or newer [-Wunguarded-availability]
[_imagePickerController dismissViewControllerAnimated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h:229:1: note:
'dismissViewControllerAnimated:completion:' has been explicitly marked partial here
- (void)dismissViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:131:27: note: enclose 'dismissViewControllerAnimated:completion:' in an @available
check to silence this warning
[_imagePickerController dismissViewControllerAnimated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:185:27: warning: 'dismissViewControllerAnimated:completion:' is only available on
iOS 5.0 or newer [-Wunguarded-availability]
[_imagePickerController dismissViewControllerAnimated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'UIKit' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Target Support Files/image_picker/image_picker-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h:229:1: note:
'dismissViewControllerAnimated:completion:' has been explicitly marked partial here
- (void)dismissViewControllerAnimated: (BOOL)flag completion: (void (^ __nullable)(void))completion NS_AVAILABLE_IOS(5_0);
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/ios/Classes/ImagePickerPlugin.m:185:27: note: enclose 'dismissViewControllerAnimated:completion:' in an @available
check to silence this warning
[_imagePickerController dismissViewControllerAnimated:YES completion:nil];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:4:8: error: unknown type name 'FIRVisionLabelDetector'; did you mean
'FIRVisionFaceDetector'?
static FIRVisionLabelDetector *detector;
^~~~~~~~~~~~~~~~~~~~~~
FIRVisionFaceDetector
In module 'FirebaseMLVision' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Headers/Private/Firebase/Firebase.h:70:
/Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/FirebaseMLVision/Frameworks/FirebaseMLVision.framework/Headers/FIRVisionFaceDetector.h:22:12: note: 'FIRVisionFaceDetector' declared here
@interface FIRVisionFaceDetector : NSObject
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:35:4: error: expected a type
+ (FIRVisionLabelDetectorOptions *)parseOptions:(NSDictionary *)optionsData {
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:10:22: error: no visible @interface for 'FIRVision' declares the selector
'labelDetectorWithOptions:'
detector = [vision labelDetectorWithOptions:[LabelDetector parseOptions:options]];
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:13:37: error: unknown type name 'FIRVisionLabel'; did you mean 'FIRVisionFace'?
completion:^(NSArray<FIRVisionLabel *> *_Nullable labels, NSError *_Nullable error) {
^~~~~~~~~~~~~~
FIRVisionFace
In module 'FirebaseMLVision' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Headers/Private/Firebase/Firebase.h:70:
/Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/FirebaseMLVision/Frameworks/FirebaseMLVision.framework/Headers/FIRVisionFaceDetector.h:3:8: note: 'FIRVisionFace' declared here
@class FIRVisionFace;
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:22:23: error: use of undeclared identifier 'FIRVisionLabel'
for (FIRVisionLabel *label in labels) {
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:22:39: error: use of undeclared identifier 'label'; did you mean 'labels'?
for (FIRVisionLabel *label in labels) {
^~~~~
labels
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:13:66: note: 'labels' declared here
completion:^(NSArray<FIRVisionLabel *> *_Nullable labels, NSError *_Nullable error) {
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:24:40: error: use of undeclared identifier 'label'
@"confidence" : @(label.confidence),
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:25:36: error: use of undeclared identifier 'label'
@"entityID" : label.entityID,
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:26:33: error: use of undeclared identifier 'label'
@"label" : label.label
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:12:13: error: no visible @interface for 'FIRVisionFaceDetector' declares the
selector 'detectInImage:completion:'
[detector detectInImage:image
~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:37:12: error: unknown receiver 'FIRVisionLabelDetectorOptions'; did you mean
'FIRVisionFaceDetectorOptions'?
return [[FIRVisionLabelDetectorOptions alloc] initWithConfidenceThreshold:[conf floatValue]];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FIRVisionFaceDetectorOptions
In module 'FirebaseMLVision' imported from /Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/Headers/Private/Firebase/Firebase.h:70:
/Users/mainuser/Documents/flutter_projects/firebaseProject/ios/Pods/FirebaseMLVision/Frameworks/FirebaseMLVision.framework/Headers/FIRVisionFaceDetectorOptions.h:72:12: note: 'FIRVisionFaceDetectorOptions'
declared here
@interface FIRVisionFaceDetectorOptions : NSObject
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_ml_vision-0.2.1/ios/Classes/LabelDetector.m:37:49: error: no visible @interface for 'FIRVisionFaceDetectorOptions' declares the
selector 'initWithConfidenceThreshold:'
return [[FIRVisionLabelDetectorOptions alloc] initWithConfidenceThreshold:[conf floatValue]];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
12 errors generated.
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5+1/ios/Classes/FirebaseCorePlugin.m:13:17: warning: property 'dictionary' requires method 'dictionary' to be defined -
use @dynamic or provide a method implementation in this category [-Wobjc-property-implementation]
@implementation FIROptions (FLTFirebaseCorePlugin)
^
/Users/mainuser/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.2.5+1/ios/Classes/FirebaseCorePlugin.m:10:46: note: property declared here
@property(readonly, nonatomic) NSDictionary *dictionary;
^
1 warning generated.
最佳答案
我自己修好了!
这是我做的:
1. Make a new Flutter Project.
2. Copy all your files from /lib to the new project.
3. Delete the flutter/.pub-cache/hosted in your flutter Dir
4. Copy the `pubspec.yaml` file into new project.
5. Run flutter packages get
6. Delete the Pod folder in your PROJECT_DIR/ios folder, the Podfile.lock and the .workscape file (or just run 'pod clean' if you have the right cocoa pods version)
7. Go into the PROJECT_DIR/ios folder and run pod install
就是这样,您的 Flutter 应用应该可以再次运行了:)
关于firebase - Flutter Firebase 项目在 'pod update' 后无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54746271/
我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我在我的项目目录中完成了compasscreate.和compassinitrails。几个问题:我已将我的.sass文件放在public/stylesheets中。这是放置它们的正确位置吗?当我运行compasswatch时,它不会自动编译这些.sass文件。我必须手动指定文件:compasswatchpublic/stylesheets/myfile.sass等。如何让它自动运行?文件ie.css、print.css和screen.css已放在stylesheets/compiled。如何在编译后不让它们重新出现的情况下删除它们?我自己编译的.sass文件编译成compiled/t
如何在buildr项目中使用Ruby?我在很多不同的项目中使用过Ruby、JRuby、Java和Clojure。我目前正在使用我的标准Ruby开发一个模拟应用程序,我想尝试使用Clojure后端(我确实喜欢功能代码)以及JRubygui和测试套件。我还可以看到在未来的不同项目中使用Scala作为后端。我想我要为我的项目尝试一下buildr(http://buildr.apache.org/),但我注意到buildr似乎没有设置为在项目中使用JRuby代码本身!这看起来有点傻,因为该工具旨在统一通用的JVM语言并且是在ruby中构建的。除了将输出的jar包含在一个独特的、仅限ruby
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我在我的项目中添加了一个系统来重置用户密码并通过电子邮件将密码发送给他,以防他忘记密码。昨天它运行良好(当我实现它时)。当我今天尝试启动服务器时,出现以下错误。=>BootingWEBrick=>Rails3.2.1applicationstartingindevelopmentonhttp://0.0.0.0:3000=>Callwith-dtodetach=>Ctrl-CtoshutdownserverExiting/Users/vinayshenoy/.rvm/gems/ruby-1.9.3-p0/gems/actionmailer-3.2.1/lib/action_mailer
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
在MRIRuby中我可以这样做:deftransferinternal_server=self.init_serverpid=forkdointernal_server.runend#Maketheserverprocessrunindependently.Process.detach(pid)internal_client=self.init_client#Dootherstuffwithconnectingtointernal_server...internal_client.post('somedata')ensure#KillserverProcess.kill('KILL',
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我已经从我的命令行中获得了一切,所以我可以运行rubymyfile并且它可以正常工作。但是当我尝试从sublime中运行它时,我得到了undefinedmethod`require_relative'formain:Object有人知道我的sublime设置中缺少什么吗?我正在使用OSX并安装了rvm。 最佳答案 或者,您可以只使用“require”,它应该可以正常工作。我认为“require_relative”仅适用于ruby1.9+ 关于ruby-主要:Objectwhenrun