如何在flutter中降级rxdart插件?

问题描述 投票:0回答:3

我按照这个显示(只有前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来降级它并且颤动包得到,但它没有用。

顺便说一句,这是我第一次尝试使用插件,所以我对解决这类问题没有任何线索......

我能做些什么来完成这项工作?

亲切的问候

更新:

我试过这个之后:

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!

dart flutter rxdart
3个回答
0
投票

请尝试在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并尝试


1
投票
rxdart:any 

试一试,让我们知道会发生什么


0
投票

旧版本可以在这里找到 - https://pub.dartlang.org/packages/rxdart#-versions-tab-

如果由于旧版本而收到AndroidX错误,请查看此页面以解决AndroidX问题 - https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility

© www.soinside.com 2019 - 2024. All rights reserved.