tmap_map_fluttify腾讯地图插件无法调试的解决办法

我怕爱的太早我们不能终老 提交于 2020-12-27 00:01:26

问题:在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。搞定。

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!