
我在两台mac计算机上运行相同的代码.
我刚刚对后者进行了全新安装,并在FirebaseAuthPlugin.m上出现了构建错误:不兼容的块指针
/Users/sergebesnard/Development/Flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.5.9/ios/Classes/FirebaseAuthPlugin.m:69:53:Incompatible block pointer types sending 'voID (^)(FIRUser *__strong,NSError *__strong)' to parameter of type 'FIRAuthDataResultCallback _Nullable' (aka 'voID (^)(FIRAuthDataResult * _Nullable __strong,NSError * _Nullable __strong)')
在我的笔记本电脑上,代码构建顺利,唯一的区别是beta版本,即0.3.1并且安装了androID工具链.
在iMac上(失败):
Flutter doctor -v[✓] Flutter (Channel beta,v0.3.2,on Mac OS X 10.13.4 17E202,locale fr-BE) • Flutter version 0.3.2 at /Users/sergebesnard/Development/Flutter • Framework revision 44b7e7d3f4 (3 weeks ago),2018-04-20 01:02:44 -0700 • Engine revision 09d05a3891 • Dart version 2.0.0-dev.48.0.Flutter-fe606f890b[✗] AndroID toolchain - develop for AndroID devices ✗ Unable to locate AndroID SDK. Install AndroID Studio from: https://developer.androID.com/studio/index.HTML On first launch it will assist you in installing the AndroID SDK components. (or visit https://Flutter.io/setup/#androID-setup for detailed instructions). If AndroID SDK has been installed to a custom location,set $ANDROID_HOME to that location.[✓] iOS toolchain - develop for iOS devices (Xcode 9.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.3,Build version 9E145 • ios-deploy 1.9.2 • CocoaPods version 1.5.0[✗] AndroID Studio (not installed) • AndroID Studio not found; download from https://developer.androID.com/studio/index.HTML (or visit https://Flutter.io/setup/#androID-setup for detailed instructions).[✓] VS Code (version 1.23.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Dart Code extension version 2.12.1[✓] Connected devices (1 available) • iPhone X • 780C4B10-21A6-41E0-9A05-A6175FC20FA0 • ios • iOS 11.3 (simulator)! Doctor found issues in 2 categorIEs.
在macbook上(工作):
[✓] Flutter (Channel beta,v0.3.1,on Mac OS X 10.13.4 17E199,locale fr-BE) • Flutter version 0.3.1 at /Users/sergebesnard/Flutter • Framework revision 12bbaba9ae (3 weeks ago),2018-04-19 23:36:15 -0700 • Engine revision 09d05a3891 • Dart version 2.0.0-dev.48.0.Flutter-fe606f890b[✓] AndroID toolchain - develop for AndroID devices (AndroID SDK 27.0.2) • AndroID SDK at /Users/sergebesnard/library/AndroID/sdk • AndroID NDK location not configured (optional; useful for native profiling support) • Platform androID-27,build-tools 27.0.2 • 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-915-b08) • All AndroID licenses accepted.[✓] iOS toolchain - develop for iOS devices (Xcode 9.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.3,Build version 9E145 • ios-deploy 1.9.2 • CocoaPods version 1.5.0[✓] AndroID Studio (version 3.0) • AndroID Studio at /Applications/AndroID Studio.app/Contents • Flutter plugin version 20.0.1 • Dart plugin version 171.4424 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)[✓] IntelliJ IDEA Community Edition (version 2017.3.4) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 23.2.2 • Dart plugin version 173.4700[✓] VS Code (version 1.23.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Dart Code extension version 2.12.0[✓] Connected devices (1 available) • iPhone X • 03F5FA6E-7332-46A2-9BF8-A1CACE723CC8 • ios • iOS 11.3 (simulator)• No issues found!
Podfile是一样的:
# Uncomment this line to define a global platform for your project# platform :ios,'9.0'# CocoaPods analytics sends network stats synchronously affecting Flutter build latency.ENV['COCOAPODS_disABLE_STATS'] = 'true'def parse_KV_file(file,separator='=') file_abs_path = file.expand_path(file) if !file.exists? file_abs_path return []; end pods_ary = [] skip_line_start_symbols = ["#","/"] file.foreach(file_abs_path) { |line| next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } plugin = line.split(pattern=separator) if plugin.length == 2 podname = plugin[0].strip() path = plugin[1].strip() podpath = file.expand_path("#{path}",file_abs_path) pods_ary.push({:name => podname,:path => podpath}); else puts "InvalID plugin specification: #{line}" end } return pods_aryendtarget 'Runner' do use_frameworks! # Prepare symlinks folder. We use symlinks to avoID having Podfile.lock # referring to absolute paths on developers' machines. system('rm -rf Pods/.symlinks') system('mkdir -p Pods/.symlinks/plugins') # Flutter Pods generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') if generated_xcode_build_settings.empty? puts "Generated.xcconfig must exist. If you're running pod install manually,make sure Flutter packages get is executed first." end generated_xcode_build_settings.map { |p| if p[:name] == 'FlutteR_FRAMEWORK_DIR' symlink = file.join('Pods','.symlinks','Flutter') file.symlink(file.dirname(p[:path]),symlink) pod 'Flutter',:path => file.join(symlink,file.basename(p[:path])) end } # Plugin Pods plugin_pods = parse_KV_file('../.Flutter-plugins') plugin_pods.map { |p| symlink = file.join('Pods','plugins',p[:name]) file.symlink(p[:path],symlink) pod p[:name],'ios') }endpost_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' end endend 在这两种情况下,pod版本都是1.5.0.
Pubspec.yaml:
dependencIEs: Flutter: sdk: Flutter Google_sign_in: "^3.0.2" firebase_analytics: "^0.3.3" firebase_auth: "^0.5.5" firebase_database: "^0.4.6" firebase_storage: "^0.2.6" cloud_firestore: "^0.6.3" #firebase_messaging: "^0.2.4" removed due to BUG in androID simple_permissions: "^0.1.2" diff_match_patch : 0.2.1 path_provIDer: "^0.4.0" intl: "^0.15.6" #timeago: 1.2.0 #sIDe_header_List_vIEw: "^0.0.2" uuID: "^1.0.0" #location: "^1.2.0" causes a problem in androID robyn_nlp: path: ../robyn-nlp async_message_queue_controller: path: ../AsyncmessageQueueProcessor oscillo_wave_painter: path: ../oscillo-wave-painter #medcorder_audio: # path: ../Flutter_audio # super important,because the original doesn't work voice_recorder: path: ../voice_recorder # The following adds the Cupertino Icons Font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.0dev_dependencIEs: Flutter_test: sdk: Flutter# For information on the generic Dart part of this file,see the# following page: https://www.dartlang.org/tools/pub/pubspec# The following section is specific to Flutter.Flutter: # The following line ensures that the Material Icons Font is # included with your application,so that you can use the icons in # the material Icons class. uses-material-design: true # To add assets to your application,add an assets section,like this: assets: - assets/logo-solo.png - assets/banner.png
坦率地说,我宁愿不在我的工作设置上测试升级颤振sdk,我仍然需要处理那些东西……
我不知道这是否有用,但在安装过程中,我遇到了在XCODE上安装颤动的问题,因为当时XCODE没有完全设置.
颤动的医生确实要求我安装包六,并因为python @ 2版本中的冲突而出现问题,所以我强制通过brew python @ 2卸载并重新安装它,然后可以通过`pip install six`安装
如果这是原因,我将不得不重新安装XCODE&扑.希望不是这样的.
谢谢
哔叽
pod repo update
然后删除Podfile,Podfile.lock,Pos目录,.Flutter-plugins,.packages,pubspec.lock
总结以上是内存溢出为你收集整理的在Beta 0.3.2上使用Firebase-auth插件的Flutter的Xcode构建错误:不兼容的块指针全部内容,希望文章能够帮你解决在Beta 0.3.2上使用Firebase-auth插件的Flutter的Xcode构建错误:不兼容的块指针所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)