[当我尝试执行Flutter项目时,在“解决依赖关系”步骤中获得“错误运行Gradle”

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

我怀疑代理设置没有正确设置,或者我可能有误,请在这里帮助我。我正在公司网络下工作并使用VPN。

下面的错误详细信息:

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "D:\flutter_workspace\flutter_app\android\gradlew.bat" exited abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)


FAILURE: Build failed with an exception.

Finished with error: Please review your Gradle project setup in the android/ folder.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.2.1.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.2.1.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
               > Connect to dl.google.com:443 [dl.google.com/172.217.9.14] failed: Connection refused: connect

* 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 17s
  Command: D:\flutter_workspace\flutter_app\android\gradlew.bat app:properties
flutter android-gradle build.gradle
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.