Flutter开始报错:无法解码来自https://pub.dev的归档通知

移动开发 2026-07-09

在尝试编译一个应用,甚至在升级Flutter本身时,我看到这个错误:

Failed to decode advisories for archive from https://pub.dev.

FormatException: advisoriesUpdated must be a String

package:pub/src/source/hosted.dart 670               HostedSource.\_extractAdvisoryDetailsForPackage

package:pub/src/source/hosted.dart 622               HostedSource.\_fetchAdvisories

===== asynchronous gap ===========================

package:pub/src/source/hosted.dart 839               HostedSource.\_getAdvisories

===== asynchronous gap ===========================

package:pub/src/source/hosted.dart 1120              HostedSource.getAdvisoriesForPackageVersion

===== asynchronous gap ===========================

package:pub/src/solver/report.dart 425               SolveReport.\_reportPackage

解决方案

可能值得关注这个问题,但总体看来似乎没有机制能够避免这次失败

https://github.com/dart-lang/pub/issues/4813

站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。

相关文章