问题:在pubspec.yaml中增加依赖
tmap_map_fluttify: ^0.3.0
然后flutter run。结果卡死在
Running Gradle task 'assembleDebug'...
解决过程:
猜应该有打日志的命令,果然
flutter run --verbose-system-logs
卡了好久,出现以下提示。
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':foundation_fluttify'.
> Could not resolve all artifacts for configuration ':foundation_fluttify:classpath'.
> Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
> Premature end of Content-Length delimited message body (expected: 36615572; received: 29622048
> Could not get unknown property 'android' for project ':foundation_fluttify' 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 47m 49s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 2870.0s (!)
Exception: Gradle task assembleDebug failed with exit code 1
果然还是下载不了jar包。
拜完百度,拜google。说是把gradle在设置里面改成offline work。结果在idea里面找了一圈没找到。
然后看到这位大哥写个关于Could not download kotlin-compiler-embeddable.jar的解决办法。https://blog.csdn.net/qq_33721320/article/details/104935041
寻思着拷贝进去试试看。
用迅雷下载kotlin-compiler-embeddable-1.3.50.jar,用浏览器下,还是不行。下不下来。
我的是mac,就把jar放在
/Users/(用户名)/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-compiler-embeddable/1.3.50
目录下。然后再运行flutter run。搞定。
来源:oschina
链接:https://my.oschina.net/keigo/blog/4842402