错误记录发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)(代
Posted 韩曙亮
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)(代相关的知识,希望对你有一定的参考价值。
一、报错信息
推送 Flutter 包到中央仓库 , 第一次推送报错 ,
D:\\002_Project\\002_android_Learn\\flutter_package>flutter packages pub publish --server=https://pub.dartlang.org
Publishing flutter_package 0.0.1 to https://pub.dartlang.org:
|-- .gitignore
|-- .metadata
|-- CHANGELOG.md
|-- LICENSE
|-- README.md
|-- lib
| '-- flutter_package.dart
|-- pubspec.yaml
'-- test
'-- flutter_package_test.dart
Publishing is forever; packages cannot be unpublished.
Policy details are available at https://pub.dev/policy
Do you want to publish flutter_package 0.0.1 (y/N)? y
Uploading...
Version 0.0.1 of package flutter_package already exists.
pub finished with exit code 1
好 , 版本号已经存在 , 这里修改下版本号再次推送 ,
D:\\002_Project\\002_Android_Learn\\flutter_package>flutter packages pub publish --server=https://pub.dartlang.org
Publishing flutter_package 0.0.3 to https://pub.dartlang.org:
|-- .gitignore
|-- .metadata
|-- CHANGELOG.md
|-- LICENSE
|-- README.md
|-- lib
| '-- flutter_package.dart
|-- pubspec.yaml
'-- test
'-- flutter_package_test.dart
Package validation found the following potential issue:
* .\\CHANGELOG.md doesn't mention current version (0.0.3).
Consider updating it with notes on this version prior to publication.
Package validation found the following hint:
* You're about to publish a package that opts into null safety.
The previous version (0.0.1) isn't opted in.
See https://dart.dev/null-safety/migration-guide for best practices.
Publishing is forever; packages cannot be unpublished.
Policy details are available at https://pub.dev/policy
Package has 1 warning and 1 hint... Do you want to publish flutter_package 0.0.3 (y/N)? y
Uploading...
`xx@gmail.com` has insufficient permissions to upload new versions of package `flutter_package`.
pub finished with exit code 1
二、解决方案
到 https://pub.dev/packages 搜索一下 , flutter_package 名字已经有人占了 , 有个老兄在 2019 年就使用了该名称 , 上传的是 v0.01 版本 , 因此第一次报错是版本已存在 ;
第二次改了下版本 , 上传时会验证权限 , 不是本人 , 肯定不能覆盖这个版本号 ;
总结一下就是 , Flutter 插件名称被人占了 , 就不能再用了 , 重新取个新名字吧 ;
整了个超长的名字 flutter_package_first_demo , 上传成功 ;
以上是关于错误记录发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)(代的主要内容,如果未能解决你的问题,请参考以下文章
错误记录发布 Flutter 插件包报错 ( ‘gmail.com‘ has insufficient permissions to upload new versions of package)(代
错误记录安装 Visual Studio 2013 中文语言包报错 ( 需要 Microsoft Visual Studio Test Agent , 但此计算机上并为安装它 )
Python 学习记录Pycharm导入第三方包报错问题……ValueError: check_hostname requires server_hostname