开发编译启动时卡住

来源:7-3 Flutter主流视频播放器分析

慕码人7147926

2024-03-16

卡大概十分钟左右,提示如下错误:
图片描述

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Launching lib\main.dart on IN2010 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':package_info_plus'.
> Could not resolve all files for configuration ':package_info_plus:classpath'.
   > Could not resolve com.android.tools.build:gradle:8.1.2.
     Required by:
         project :package_info_plus
      > Could not resolve com.android.tools.build:gradle:8.1.2.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.1.2/gradle-8.1.2.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.1.2/gradle-8.1.2.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.6.3/userguide/build_environment.html#gradle_system_properties
                  > Remote host terminated the handshake
> Failed to notify project evaluation listener.
   > Could not get unknown property 'android' for project ':package_info_plus' of type org.gradle.api.Project.
   > Could not get unknown property 'android' for project ':package_info_plus' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 11m 10s
Retrying Gradle Build: #1, wait time: 100ms
[!] Gradle threw an error while downloading artifacts from the network.
Running Gradle task 'assembleDebug'...

我怎么配置这个 gradle8.1.2的源?怎么排查是哪个第三方库依赖的 gradle8.1.2?

写回答

1回答

CrazyCodeBoy

2024-03-18

这是网络原因导致没有下载到项目所需要依赖的三方库,可以开启下VPN多试几次看看。
0
0

Flutter高级进阶实战-仿哔哩哔哩-掌握Flutter高阶技能

一次性掌握Flutter高阶技能+商业级复杂项目架构设计与开发方案

1745 学习 · 880 问题

查看课程