Flutter pub升级报告显示过时,但flutter pub过时报告什么都没有,

wrrgggsh  于 4个月前  发布在  Flutter
关注(0)|答案(2)|浏览(75)

步骤重现:

  1. 创建新的Flutter项目
  2. 提示:8个包有与依赖关系约束不兼容的更新版本,尝试flutter pub outdated以获取更多信息。
  3. 提示:报告一个包(lints包)已过时。
  4. 提示:重复“8个包有更新版本”的消息
  5. 获取:显示过时的包。
    [*] 表示不是最新可用的版本。
    包名:当前可升级、可解析、最新
    直接依赖:全部都是最新的。
    dev_dependencies:全部都是最新的。
    所有依赖项都是最新的。

预期结果:flutter pub upgradeflutter pub upgrade --major-versionsflutter pub outdated应该就发生了什么达成一致。

实际结果:请参见重现步骤

代码示例:使用新项目进行描述

截图或视频:截图/视频演示
[在这里上传媒体]

日志:flutter pub outdated --verbose超过了粘贴板512KB的限制;flutter pub upgrade --verbose也是如此。

Flutter Doctor输出:
[✓] Flutter (稳定频道,3.22.1,macOS 14.5 23F79 darwin-arm64,区域设置 en-AU)
• Flutter版本 3.22.1 在稳定频道上,位于 /Users/gisborne/dev/bin/flutter
• 上游仓库 https://github.com/flutter/flutter.git
• 框架修订 a14f74f (13天前),2024-05-22 11:08:21 -0500
• 引擎修订55eae6864b
• Dart版本 3.4.1
• DevTools版本 2.34.3
[!] Android工具链 - 为Android设备开发(Android SDK版本33.0.2)
• Android SDK位于 /Users/gisborne/Library/Android/sdk
• 平台 android-33,构建工具33.0.2
• ANDROID_HOME = /Users/gisborne/Library/Android/sdk
✗ Android SDK文件未找到:/Users/gisborne/Library/Android/sdk/platforms/android-33/android.jar。
• 请尝试重新安装或更新您的Android SDK,访问 https://flutter.dev/docs/get-started/install/macos#android-setup 以获取详细说明。
[✓] Xcode - 为iOS和macOS开发(Xcode 15.4)
• Xcode位于 /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods版本1.15.2
[✓] Chrome - 为Web开发(Chrome版本未知)
[!] Android Studio(未安装)
• Android Studio未找到;从 https://developer.android.com/studio/index.html 下载(或访问 https://flutter.dev/docs/get-started/install/macos#android-setup 以获取详细说明)。
[✓] IntelliJ IDEA Ultimate Edition(版本2024.1)
• IntelliJ位于 /Applications/IntelliJ IDEA.app
• Flutter插件版本79.1.3
• Dart插件版本241.17502
[✓] VS Code(版本1.89.1)
• VS Code位于 /Applications/Visual Studio Code.app/Contents
• Flutter扩展版本3.27.0
[✓] 已连接设备(6个可用)
• Iris(移动)•00008030-001879541480802E•iOS•iOS 17.5.1 21F90
• Athena(移动)•00008103-0008716C216B001E•iOS•iOS 17.5.1 21F90
• iPhone SE(第三代)(移动)•3492AACC-3C82-4924-B5B9-81656EE116A0•iOS•com.apple.CoreSimulator.SimRuntime.iOS-17-5(模拟器)
• macOS(桌面)•macos•darwin-arm64•macOS 14.5 23F79 darwin-arm64
• Mac Designed for iPad(桌面)•mac-designed-for-ipad•darwin•macOS 14.5 23F79 darwin-arm64
• Chrome(网络)•chrome•web-javascript•Google Chrome 125.0.6422.61

6rvt4ljy

6rvt4ljy1#

我可以在Flutter稳定版3.22.1上复现这个问题。在主渠道上,upgrade命令似乎不起作用。请查看下面的输出样本以获取详细信息。

复现步骤的详细输出(稳定版3.22.1)

➜  reproduce_issues_3 flutter pub upgrade
Resolving dependencies... (2.6s)
Downloading packages... 
camera 0.10.6 (0.11.0+1 available)
flutter_lints 3.0.2 (4.0.0 available)
> google_maps_flutter_android 2.9.0 (was 2.8.1)
> google_maps_flutter_ios 2.7.0 (was 2.6.1)
> google_maps_flutter_web 0.5.8 (was 0.5.7)
js 0.6.7 (0.7.1 available)
< leak_tracker 10.0.4 (was 10.0.5) (10.0.5 available)
< leak_tracker_flutter_testing 3.0.3 (was 3.0.5) (3.0.5 available)
lints 3.0.0 (4.0.0 available)
< material_color_utilities 0.8.0 (was 0.11.1) (0.11.1 available)
< meta 1.12.0 (was 1.15.0) (1.15.0 available)
< test_api 0.7.0 (was 0.7.2) (0.7.2 available)
< vm_service 14.2.1 (was 14.2.3) (14.2.3 available)
Changed 9 dependencies!
10 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜  reproduce_issues_3 flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name   Current  Upgradable  Resolvable  Latest    

direct dependencies:
camera         *0.10.6  *0.10.6     0.11.0+1    0.11.0+1  

dev_dependencies:
flutter_lints  *3.0.2   *3.0.2      4.0.0       4.0.0     

2  dependencies are constrained to versions that are older than a resolvable version.
To update these dependencies, edit pubspec.yaml, or run `flutter pub upgrade --major-versions`.
➜  reproduce_issues_3 flutter pub upgrade --major-versions
Resolving dependencies... (1.6s)
Downloading packages... 
> camera 0.11.0+1 (was 0.10.6)
+ camera_android_camerax 0.6.5+5
> flutter_lints 4.0.0 (was 3.0.2)
js 0.6.7 (0.7.1 available)
leak_tracker 10.0.4 (10.0.5 available)
leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
> lints 4.0.0 (was 3.0.0)
material_color_utilities 0.8.0 (0.11.1 available)
meta 1.12.0 (1.15.0 available)
test_api 0.7.0 (0.7.2 available)
vm_service 14.2.1 (14.2.3 available)
These packages are no longer being depended on:
- camera_android 0.10.9+3
Changed 5 dependencies!
7 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Changed 2 constraints in pubspec.yaml:
camera: ^0.10.5+9 -> ^0.11.0+1
flutter_lints: ^3.0.0 -> ^4.0.0
➜  reproduce_issues_3 flutter pub upgrade
Resolving dependencies... (2.3s)
Downloading packages... 
js 0.6.7 (0.7.1 available)
< leak_tracker 10.0.4 (was 10.0.5) (10.0.5 available)
< leak_tracker_flutter_testing 3.0.3 (was 3.0.5) (3.0.5 available)
< material_color_utilities 0.8.0 (was 0.11.1) (0.11.1 available)
< meta 1.12.0 (was 1.15.0) (1.15.0 available)
< test_api 0.7.0 (was 0.7.2) (0.7.2 available)
< vm_service 14.2.1 (was 14.2.3) (14.2.3 available)
Changed 6 dependencies!
7 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜  reproduce_issues_3 flutter pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest  

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.
all dependencies are up-to-date.
➜  reproduce_issues_3

复现步骤的详细输出(主渠道,3.23.0-13.0.pre.100)

➜  reproduce_issues_3 flutterm pub upgrade
Resolving dependencies... (2.1s)
Downloading packages... 
js 0.6.7 (0.7.1 available)
> leak_tracker 10.0.5 (was 10.0.4)
> leak_tracker_flutter_testing 3.0.5 (was 3.0.3)
> material_color_utilities 0.11.1 (was 0.8.0)
> meta 1.15.0 (was 1.12.0)
> test_api 0.7.2 (was 0.7.0)
> vm_service 14.2.3 (was 14.2.1)
Changed 6 dependencies!
1 package has newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜  reproduce_issues_3 flutterm pub outdated
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest  

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.

transitive dependencies:
js            *0.6.7   *0.6.7      *0.6.7      0.7.1   
all dependencies are up-to-date.
➜  reproduce_issues_3 flutterm pub upgrade --major-versions
Resolving dependencies... (1.4s)
No changes to pubspec.yaml!
Resolving dependencies... 
Downloading packages... 
js 0.6.7 (0.7.1 available)
No dependencies changed.
1 package has newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜  reproduce_issues_3 flutterm pub upgrade                 
Resolving dependencies... (1.8s)
Downloading packages... 
js 0.6.7 (0.7.1 available)
No dependencies changed.
1 package has newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
➜  reproduce_issues_3 flutterm pub outdated                
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name  Current  Upgradable  Resolvable  Latest  

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.

transitive dependencies:
js            *0.6.7   *0.6.7      *0.6.7      0.7.1   
all dependencies are up-to-date.
➜  reproduce_issues_3

flutter doctor -v (稳定和主渠道)

[✓] Flutter (Channel stable, 3.22.1, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.22.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (13 days ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode15.3.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 125.0.6422.142

[✓] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.23.0-13.0.pre.100, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.23.0-13.0.pre.100 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 63daac2a51 (2 hours ago), 2024-06-04 21:16:19 -0400
    • Engine revision 11a32d43e3
    • Dart version 3.5.0 (build 3.5.0-222.0.dev)
    • DevTools version 2.36.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode15.3.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 125.0.6422.142

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
jgzswidk

jgzswidk2#

同样的问题在这里
解决依赖关系... (1.8s)
下载包...
collection 1.18.0 (1.19.0 可用)
http_parser 4.0.2 (4.1.0 可用)
leak_tracker 10.0.4 (10.0.5 可用)
leak_tracker_flutter_testing 3.0.3 (3.0.5 可用)
material_color_utilities 0.8.0 (0.12.0 可用)
meta 1.12.0 (1.15.0 可用)
string_scanner 1.2.0 (1.3.0 可用)
test_api 0.7.0 (0.7.3 可用)
vm_service 14.2.1 (14.2.4 可用)
web 0.5.1 (1.0.0 可用)
获取依赖关系!
有10个包有与依赖关系约束不兼容的更新版本。
尝试 flutter pub outdated 以获取更多信息。
pubspec.yaml 没有更改!
PS C:\Project\Secret> flutter pub outdated
显示过时的包。
[*] 表示不是最新可用的版本。
包名 当前 可升级 可解析 最新
直接依赖:全部是最新的。
开发依赖:全部是最新的。
所有依赖项都是最新的。

相关问题