接入高德定位(原^0.10.0+e74b91b),进行flutter upgrade之后,用iOS Run正常,安卓夜神模拟器报错。
首先对版本进行了更新,使用了最新的(^0.11.0),结果更新之后,还是报错如下:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':amap_core_fluttify:generateDebugRFile'.
> Could not resolve all task dependencies for configuration ':amap_core_fluttify:debugRuntimeClasspath'.
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-540786dd51f112885a89792d678296b95e6622e5.
Required by:
project :amap_core_fluttify
project :amap_core_fluttify > project :foundation_fluttify
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-540786dd51f112885a89792d678296b95e6622e5.
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-540786dd51f112885a89792d678296b95e6622e5/flutter_embedding_debug-1.0.0-540786dd51f112885a89792d678296b95e6622e5.pom'.
> Could not HEAD 'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-540786dd51f112885a89792d678296b95e6622e5/flutter_embedding_debug-1.0.0-540786dd51f112885a89792d678296b95e6622e5.pom'.
> Connect to storage.googleapis.com:443 [storage.googleapis.com/34.64.4.112] failed: connect timed out
* 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 1m 45s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 107.8s
Exception: Gradle task assembleDebug failed with exit code 1
这里提醒一下,如果揩油VPN的话,建议先关一下,尝试。如果还是不行,解决按下面步骤尝试:
进入:flutterSDK的安装路径下,找到packages,找到flutter_tools,找到gradle,文本编辑器打开flutter.gradle,搜索:
将其替换为:
再次run即可
网友评论