Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
639 views
in Technique[技术] by (71.8m points)

android studio - Flutter doctor shows everything OK but code doesn't compile (Basically, the IDE doesn't recognize Flutter sdk)

I just created a new project and for some reason it has compile errors thus cannot run the app. When I run flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel dev, 1.26.0-1.0.pre, on macOS 11.1 20C69 darwin-x64, locale en-DE)
[?] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[?] Xcode - develop for iOS and macOS (Xcode 12.3)
[?] Android Studio (version 4.1)
[?] Android Studio
[?] VS Code (version 1.52.1)
[?] Connected device (1 available)

But the code looks like this:

enter image description here

When trying from Android Studio:

enter image description here

Issue I found out: Disabling the Dart sdk makes the code compile but of course I cannot run anything on this state:

enter image description here

Running which flutter dart :

~/Documents/flutter_sdk/flutter/bin/flutter
~/Documents/flutter_sdk/flutter/bin/dart

I did check the issue here, but no luck.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...