无法在android模拟器上运行flutter

问题描述 投票:0回答:1

在 sdk gphone64 x86 64 上以调试模式启动 lib\main.dart...

FAILURE:构建失败并出现异常。

  • 出了什么问题: 任务“:app:checkDebugAarMetadata”执行失败。

无法解析配置“:app:debugRuntimeClasspath”的所有文件。 无法解析 io.flutter:flutter_embedding_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 要求者: 项目:应用程序 > 无法解析 io.flutter:flutter_embedding_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 >无法获取资源'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/flutter_embedding_debug-1.0.0-c4cd48e186460b32d4458 5ce3c103271ab676355.pom'。 >无法获取'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/flutter_embedding_debug-1.0.0-c4cd48e186460b32d4458 5ce3c103271ab676355.pom'。从服务器收到状态代码 403:禁止 无法解析 io.flutter:x86_64_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 要求者: 项目:应用程序 > 无法解析 io.flutter:x86_64_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 >无法获取资源'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_64_debug-1.0.0-c4cd48e186460b32d4458 5ce3c103271ab676355.pom'。 >无法获取'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_64_debug-1.0.0-c4cd48e186460b32d4458 5ce3c103271ab676355.pom'。从服务器收到状态代码 403:禁止 无法解析 io.flutter:x86_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 要求者: 项目:应用程序 > 无法解析 io.flutter:x86_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355。 >无法获取资源'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c10 3271ab676355.pom'。 > 无法获取 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c10 3271ab676355.pom'。从服务器收到状态代码 403:禁止

  • 尝试:

使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获得更多日志输出。 使用 --scan 运行以获得完整的见解。

3秒内构建失败 运行 Gradle 任务“assembleDebug”... 4.5s [!] Gradle 在从网络下载工件时抛出错误。

每次尝试在 Android 模拟器上运行 flutter 时都会出现此错误。我的 android 模拟器没有问题,它是由 android studio 下载的,我尝试使用 vscode 运行它(我不使用 android studio 的原因是它在下载 dart 插件时给出错误 451)我应该做什么?

我尝试了我能找到的任何解决方案,但仍然无法在模拟器上运行它

android flutter dart
1个回答
0
投票

正如您在控制台中收到的错误中所看到的:

Gradle threw an error while downloading artifacts from the network.

尝试运行应用程序时确保有互联网连接,以便正确下载所有工件。

此错误可能与Android模拟器有关。请尝试在物理设备上运行该应用程序,看看是否会出现相同的错误,然后确认。

© www.soinside.com 2019 - 2024. All rights reserved.