Flutter 修改sdk路径后报错

  • Flutter报错:
Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.
  running Flutter tool: D:\SDE\flutters\flutter_v1.9.1\flutter
  previous reference  : D:\SDE\flutter
This can happen if you deleted or moved your copy of the Flutter repository, or if it was on a volume that is no longer mounted or has been mounted at a different location. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).

Running "flutter pub get" in my_app...                          
The current Flutter SDK version is 1.9.1+hotfix.6.
  • 解决方法:
    修改项目内的.packages文件中的flutter SDK路径。
# Generated by pub on 2019-12-11 09:54:08.503802.
archive:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.11/lib/
args:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2/lib/
async:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.0/lib/
boolean_selector:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5/lib/
charcode:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib/
collection:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib/
convert:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib/
crypto:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.3/lib/
cupertino_icons:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.3/lib/
flutter:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/packages/flutter/lib/
flutter_test:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/packages/flutter_test/lib/
image:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.4/lib/
matcher:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6/lib/
meta:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8/lib/
path:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4/lib/
path_provider:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.5.1/lib/
pedantic:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1/lib/
petitparser:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-2.4.0/lib/
platform:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1/lib/
quiver:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.5/lib/
sky_engine:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/bin/cache/pkg/sky_engine/lib/
source_span:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib/
stack_trace:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
stream_channel:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
string_scanner:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5/lib/
term_glyph:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
test_api:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.11/lib/
typed_data:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
vector_math:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib/
xml:file:///D:/SDE/flutters/flutter_v1.9.1/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-3.5.0/lib/
my_app:lib/

  • 0
    点赞
  • 2
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

打赏
文章很值,打赏犒劳作者一下
相关推荐
©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页

打赏

L小菜鸟L

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者