请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

项目在android 模拟器上运行时,报错

图片描述
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 版本,还是不行,请教老师

正在回答 回答被采纳积分+3

2回答

CrazyCodeBoy 2019-04-27 22:36:26

从log上看你是不是设置本地代理呢?程序从你的本地代理127.0.0.1:1087上下载依赖库失败

将代理关闭,多试几次吧

0 回复 有任何疑惑可以回复我~
啥破狼 2019-04-27 16:33:41

试试科学上网?我以前也碰到过这个问题。

0 回复 有任何疑惑可以回复我~
  • abcd而非abc 回复 提问者 低调的小火柴 #1
    我设置了镜像,下载url_launch 的时候能正常下载,就是运行flutter项目的时候报错,跟你的一样请问怎么解决的额?着急进行项目
    回复 有任何疑惑可以回复我~ 2019-05-26 09:47:18
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信