C:\Users\admin\Downloads\memos-main\memos-main>flutter channel beta Switching to flutter channel 'beta'... git: Branch 'beta' set up to track remote branch 'beta' from 'origin'. git: Switched to a new branch 'beta' Successfully switched to flutter channel 'beta'. To ensure that you're on the latest build from this channel, run 'flutter upgrade'
C:\Users\admin\Downloads\memos-main\memos-main>hover build windows hover: Downloading engine for platform windows-release at version a123e75c6082da3a08f229b9c565e64b5b24a8a3... Download completed in 23.08s hover: Cleaning the build directory hover: Bundling flutter app VersionCheckError: Command exited with code 128: git fetch __flutter_version_check__ beta Standard error: fatal: unable to access 'https://github.com/flutter/flutter.git/': OpenSSL SSL_read: Connection was reset, errno 10054
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source! Downloading package sky_engine... 368ms Downloading flutter_patched_sdk tools... 448ms Downloading flutter_patched_sdk_product tools... 240ms Downloading windows-x64 tools... 1,023ms Downloading windows-x64/font-subset tools... 173ms Running "flutter pub get" in memos-main... 839ms
Building with sound null safety
hover: Generating kernel snapshot result 67978fb7-9906-4bd1-a022-0f2cb4d31ba0 lib/main_desktop.dart: Warning: Interpreting this as package URI, 'package:memos/main_desktop.dart'. 67978fb7-9906-4bd1-a022-0f2cb4d31ba0 nel_snapshot.dill 0 hover: Generating ELF snapshot Warning: Generating ELF library without DWARF debugging information. hover: Checking available release on Github hover: Compiling 'go-flutter' and plugins runtime/cgo github.com/go-flutter-desktop/go-flutter/internal/currentthread github.com/go-flutter-desktop/go-flutter/embedder github.com/go-gl/glfw/v3.3/glfw github.com/go-gl/gl/v3.3-core/gl github.com/go-flutter-desktop/go-flutter/internal/priorityqueue github.com/go-flutter-desktop/go-flutter/internal/keyboard github.com/go-flutter-desktop/go-flutter/internal/opengl github.com/go-flutter-desktop/go-flutter hover: Successfully compiled executable binary for windows
编译windows不能直接进行使用,必须移动整个文件夹才能使用,所以使用以下命令打包
C:\Users\admin\Downloads\memos-main\memos-main>hover build windows-msi hover: Using engine from cache hover: Cleaning the build directory hover: Bundling flutter app
Building with sound null safety
hover: Generating kernel snapshot result 19414483-7af2-49ad-99fa-98b0c4ca254f lib/main_desktop.dart: Warning: Interpreting this as package URI, 'package:memos/main_desktop.dart'. 19414483-7af2-49ad-99fa-98b0c4ca254f nel_snapshot.dill 0 hover: Generating ELF snapshot Warning: Generating ELF library without DWARF debugging information. hover: Compiling 'go-flutter' and plugins hover: Successfully compiled executable binary for windows hover: Packaging app for windows-msi hover: Missing/Empty `author` field in pubspec.yaml. Please add it or otherwise you may publish your app with a wrong author. Continuing with `DESKTOP-D5VSCI4\admin` as a placeholder author. hover: Missing/Empty `license` field in go/hover.yaml. Please add it or otherwise you may publish your app with a wrong license. Continuing with `NOASSERTION` as a placeholder license. hover: Failed to read `go/packaging/windows-msi/upgrade-code.txt`: open C:\Users\admin\Downloads\memos-main\memos-main\go\packaging\windows-msi\upgrade-code.txt: The system cannot find the file specified. hover: Please re-init windows-msi to generate the `go/packaging/windows-msi/upgrade-code.txt` hover: or put a GUID from https://www.guidgen.com/ into a new `go/packaging/windows-msi/upgrade-code.txt` file.
如果报错To package windows-msi these tools are required: candle 请前往https://wixtoolset.org/releases/进行下载安装 启动下载好的Wix程序,会提示缺少.netframework3.5.1,windows的控制面板>程序>启用和关闭windows功能>勾选.netframework3.5 安装好.netfamework后再次启动Wix进行安装,安装完毕,目录为C:\Program Files (x86)\WiX Toolset v3.11 运行命令后还是缺少candle.exe,把C:\Program Files (x86)\WiX Toolset v3.11\bin加入系统环境变量的Path中即可
Failed to read `go/packaging/windows-msi/upgrade-code.txt 按照提示信息访问 https://www.guidgen.com/复制页面中的code 创建go/packaging/windows-msi/upgrade-code.txt文件,粘贴code到文本中保存即可
问题
Your Flutter application is created using an older version of the Android
embedding. It’s being deprecated in favor of Android embedding v2.
flutter已经pub get下载完插件,但是会报错 Error: Type ‘PathProviderWindows’ not found.
使用命令
flutter clean flutter pub cache repair
等下完即可
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod DKPhotoGallery depends upon SDWebImage, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.
在ios/Podfile中修改
target 'Runner' do use_frameworks! #add here flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end
Automatically assigning platform iOS with version 9.0 on target 你的工程名称 because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform
这是在使用cocoapods安装三方库配置podfile之后的一个警告信息。
# Uncomment this line to define a global platform for your project platform :ios, '9.0'