目录
一、android平台
1.
FAILURE: Build completed with 8 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea.
Required by:
project :app
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea.
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea/armeabi_v7a_debug-1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea/armeabi_v7a_debug-1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea.pom'.
> Got socket exception during request. It might be caused by SSL misconfiguration
> Connection reset
> Could not resolve io.flutter:x86_64_debug:1.0.0-109150893958777c8f2215f6cfd3e89e984e8dea.
给所有的有repositories {
的配置文件都配置上国内镜像
然后就能正常的run起来了
2.
一直卡在
Downloading kotlinc-dist GET PROCESSED https://repo1.maven.org/maven2/org/jetbrains/kotlin-compiler/2.0.21/kotlin-compiler-2.0.21.jar <> C:\Users
配置了镜像也没有用,干等着吧,就是会比较慢。
二、web平台
正常
三、Windows平台
报错:
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on Windows in debug mode...
Error: Unable to find suitable Visual Studio toolchain. Please run `flutter doctor` for more details.
解决办法:
安装 Visual Studio及c++桌面开发相关的组件
- 打开 Visual Studio Installer
- 点击 "修改" 你的 Community 2022 版本
- 在 "工作负载" 选项卡中:
- 勾选
使用 C++ 的桌面开发
- 在右侧的 "安装详细信息" 中 手动勾选以下组件:
- MSVC v142 - VS 2019 C++ x64/x86 生成工具(即使你安装的是 VS 2022,Flutter 可能仍依赖此版本)
- MSVC v143 - VS 2022 C++ x64/x86 生成工具(最新版备用)
- C++ CMake 工具 for Windows
- Windows 10 SDK(建议选 10.0.19041.0 或更高版本)
- Windows 11 SDK(可选,但推荐安装)
- 勾选
- 点击 "修改" 完成安装。
正常生成exe运行
四、ios/Mac平台
需要苹果电脑
0 条评论