【发布时间】:2020-03-03 16:36:54
【问题描述】:
我是flutter的初学者,我正在使用android studio创建我的flutter应用程序,我需要pubspec.yaml文件中的一些插件!
运行没有问题,但是当我添加 cloud_firestore、firebase_auth、firebase_storage、ImagePicker 和 fluttertoast 时出现错误!
这是错误:
** BUILD FAILED **
Xcode's output:
↳
/Users/Mr.3bd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4+2/darwin/Classes/FLTFirebaseCorePlugin.m:6:9: fatal error: 'UserAgent.h' file not found
#import "UserAgent.h"
^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform.(in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'image_picker' from project 'Pods')
warning: There are no architectures to compile for because the VALID_ARCHS build setting is an empty list. (in target 'Runner' from project 'Runner')
In file included from /Users/Mr.3bd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-3.1.3/ios/Classes/UIView+Toast.m:26:
/Users/Mr.3bd/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.2.1/ios/Classes/SqflitePlugin.m:2:9: warning: non-portable path to file '<fmdb/FMDB.h>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#import <FMDB/FMDB.h>
我的 pubspec.yaml 文件:
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase_auth: ^0.12.0
cloud_firestore: ^0.12.0
firebase_storage: ^3.1.0
shared_preferences: ^0.5.4+6
flutter_offline: ^0.3.0
provider: ^3.1.0
simple_animations: ^1.1.3
page_transition: ^1.1.4
cupertino_icons: ^0.1.3
gradient_app_bar: ^0.0.1
fluttertoast: ^3.1.1
flutter_spinkit: ^4.0.0
flutter_launcher_icons: ^0.7.3
rflutter_alert: ^1.0.3
url_launcher: ^4.1.0
flutter_speed_dial: ^1.2.5
image_picker: ^0.6.3+1
file_picker: ^1.4.3+2
validators: ^2.0.0+1
dio: ^3.0.8
flutter_plugin_pdf_viewer: ^1.0.7
任何人都可以帮助我并将插件版本更新为兼容版本!
【问题讨论】:
标签: android firebase flutter dart