项目在android 模拟器上运行时,报错
来源:6-7 如何创建和使用Flutter的路由与导航?【边学边做】
低调的小火柴
2019-04-26
Launching lib/main.dart on Android SDK built for x86 in debug mode…
Initializing gradle…
Resolving dependencies…
- Error running Gradle:
ProcessException: Process “/Users/smatch/repo/dart/flutter_trip/android/gradlew” exited abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring root project ‘android’.
Could not resolve all artifacts for configuration ‘:classpath’.
Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0)
Could not get resource ‘https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar’.
Could not GET ‘https://jcenter.bintray.com/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.jar’.
Connect to 127.0.0.1:1087 [/127.0.0.1] failed: Connection refused (Connection refused)
-
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 11s
Command: /Users/smatch/repo/dart/flutter_trip/android/gradlew app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
编译ios 没有问题,编译android 会提示这个错误,在网上找了半天,配置gradle 版本,还是不行,请教老师
2回答
-
CrazyCodeBoy
2019-04-27
从log上看你是不是设置本地代理呢?程序从你的本地代理127.0.0.1:1087上下载依赖库失败
将代理关闭,多试几次吧
00 -
啥破狼
2019-04-27
试试科学上网?我以前也碰到过这个问题。
012019-05-26
相似问题