2017-09-24 39 views
2

当我尝试添加firebase_auth,并运行flutter packages get我得到了我下面的错误扑包拿到失败

Running "flutter packages get" in demo... 
demo firebase_auth has no versions that match >=0.2.3 <0.3.0 derived from: 
- demo depends on version ^0.2.3 

我不完全相信我应该怎么做才能解决这个问题。

name: full3 
description: A new Flutter project. 

dependencies: 
    flutter: 
     path: C:\flutter\packages\flutter 
    google_sign_in: "^0.3.1" 
    firebase_auth: "^0.2.3" 

# 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: 
    fonts: 
     - family: Encode Sans 
      fonts: 
      - asset: assets/fonts/EncodeSansExpanded-Light.ttf 

    assets: 
    - assets/img/facebook.png 
    - assets/img/google.png 
    - assets/img/logo.png 
    - assets/img/signup.png 

    # The following line ensures that the Material Icons font is 
    # included with your application, so that you can use the icons in 
    # the Icons class. 
    uses-material-design: true 
    # To add assets to your application, add an assets section here, in 
    # this "flutter" section, as in: 
    # assets: 
    # - images/a_dot_burr.jpeg 
    # - images/a_dot_ham.jpeg 

    # To add assets from package dependencies, first ensure the asset 
    # is in the lib/ directory of the dependency. Then, 
    # refer to the asset with a path prefixed with 
    # `packages/PACKAGE_NAME/`. Note: the `lib/` is implied, do not 
    # include `lib/` in the asset path. 
    # 
    # Here is an example: 
    # 
    # assets: 
    # - packages/PACKAGE_NAME/path/to/asset 

    # To add custom fonts to your application, add a fonts section here, 
    # in this "flutter" section. Each entry in this list should have a 
    # "family" key with the font family name, and a "fonts" key with a 
    # list giving the asset and other descriptors for the font. For 
    # example: 
    # fonts: 
    # - family: Schyler 
    #  fonts: 
    #  - asset: fonts/Schyler-Regular.ttf 
    #  - asset: fonts/Schyler-Italic.ttf 
    #   style: italic 
    # - family: Trajan Pro 
    #  fonts: 
    #  - asset: fonts/TrajanPro.ttf 
    #  - asset: fonts/TrajanPro_Bold.ttf 
    #   weight: 700 
+0

这是一个已知的问题,由'pub get'或'flutter packages get'返回的错误消息不是很有帮助。有计划要改进,但需要更广泛的尝试,需要一些时间。这只意味着你的一些依赖约束可以防止找到一组相互兼容的依赖版本。您可以尝试启用详细输出以获取mote洞察,或者删除大多数依赖项,直到“扑动包获取”成功为止,然后逐个添加它们直至失败,以查看哪个导致冲突。您也可以尝试http://mediator.thosakwe.com –

+0

我不知道它是否支持Flutter,但对于这种情况通常很有帮助。 –

+0

我也试过这个新的新项目以及没有希望 – aziza

回答

1

这对我来说工作得很好。
我刚更改了flutter依赖项。
如果这对您不适用,您的Flutter设置可能存在问题。

name: full3 
description: A new Flutter project. 

dependencies: 
    flutter: 
    sdk: flutter 
    google_sign_in: "^0.3.1" 
    firebase_auth: "^0.2.3" 

# 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: 
    fonts: 
     - family: Encode Sans 
      fonts: 
      - asset: assets/fonts/EncodeSansExpanded-Light.ttf 

    assets: 
    - assets/img/facebook.png 
    - assets/img/google.png 
    - assets/img/logo.png 
    - assets/img/signup.png 

    # The following line ensures that the Material Icons font is 
    # included with your application, so that you can use the icons in 
    # the Icons class. 
    uses-material-design: true 
+0

有没有正确的方法来重新安装颤振? – aziza

+1

我不认为有一个特殊的程序来重新安装。您可以删除包含它的目录并重新安装https://flutter.io/setup/ –