今天在学习开发plugin,参考的是Flutter - 发布Package到Pub
测试成功,把遇到的问题记录下
执行这个步时
flutter packages pub publish --dry-run
出现问题
Downloading path 1.8.1...
Directory listing failed, path = '/Users/qiang/code/github/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/example/windows/flutter/ephemeral/.plugin_symlinks/flutter_baidu_pan_plugin/.git/objects/pack/pack-51c862d55da273a6b71c2601e2edea1463f8f5' (OS Error: File name too long, errno = 63)
主要问题所在: OS Error: File name too long
在项目目录下找到有个 /example/windows/flutter/ephemeral/.plugin_symlinks 目录 里面有软链接
尝试删除.plugin_symlinks
重新执行
flutter packages pub publish --dry-run
运行成功,后续步骤按照参考的教程都正常,成功发布plugin到了pub
|