我按照所示进行了此操作(仅前3分钟与我的问题有关):https://m.youtube.com/watch?v=MYHVyl-juUk
当我尝试运行它时,它会出现在控制台中:
因为geoflutterfire 2.0.3 + 2取决于rxdart ^ 0.20.0,并且没有任何版本的geoflutterfire匹配> 2.0.3 + 2 <3.0.0,所以geoflutterfire ^ 2.0.3 + 2需要rxdart ^ 0.20.0。 因此,由于my_app同时依赖rxdart ^ 0.21.0和geoflutterfire ^ 2.0.3 + 2,因此版本解析失败。
当前版本(以及我安装的版本)为rxdart 0.21.0。我试图通过将其更改为0.20.0来降级,但flutter软件包得到了,但没有用。
顺便说一句,这是我第一次尝试插件,因此我对解决此类问题一无所知...
我该怎么做才能使它起作用?
亲切的问候
更新:
我尝试过此:
rxdart: any
控制台将其抛出:
2019-04-08 12:06:04.178 defaults[36786:354646]
The domain/default pair of (/Users/privat/Documents/Dev/my_app/ios/Runner/Info, CFBundleIdentifier) does not exist
Xcode's output:
↳
/Library/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+2/ios/Classes/GeoflutterfirePlugin.m:2:9: fatal error:
'geoflutterfire/geoflutterfire-Swift.h' file not found
#import <geoflutterfire/geoflutterfire-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
然后我编辑了Podfile代码: 需要添加或编辑的代码标有“ ** ...... **”
target 'Runner' do
** use_frameworks! **
........ ......
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
** config.build_settings['SWIFT_VERSION'] = '4.0' **
end
end
end
然后,我删除了Podfile.lock并再次尝试,该应用程序已成功编译。 感谢C4C!
答案 0 :(得分:1)
rxdart:any
尝试一下,让我们知道会发生什么情况
答案 1 :(得分:0)
较旧的版本可以在这里找到-https://pub.dartlang.org/packages/rxdart#-versions-tab-
如果由于旧版本收到AndroidX错误,请检查此页面以解决AndroidX问题-https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
答案 2 :(得分:0)
please try this edits in Podfile Code needs to be added or edited are marked with "** ...... **"
target 'Runner' do
** use_frameworks! **
........ ......
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
** config.build_settings['SWIFT_VERSION'] = '4.0' **
end
end
end
delete your Podfile.lock and try