Open LIPUU opened 4 years ago
Could you provide the steps you performed?
$ git clone https://github.com/flutter-rs/flutter-app-template
$ cd flutter-app-template/
$ cargo install cargo-flutter
$ cargo flutter run
Error: Couldn't find flutter sdk
My futter is in ~/Programs/flutter
and has been added to the PATH
variable.
Does cargo flutter run
looks for some env varialbe like FLUTTER_HOME
or something
for sdk?
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.5)
[!] Connected device
! No devices available
! Doctor found issues in 1 category.
Okay, I found out that flutter-rs/cargo-flutter
checks for FLUTTER_ROOT
. There is also an else clause which uses which('flutter')
but that somehow didn't work.
export FLUTTER_ROOT=/path/to/flutter/bin
will do.
https://github.com/flutter-rs/cargo-flutter/blob/master/src/flutter.rs#L13
I followed the correct steps, but when I run "cargo flutter run " I got a "error: couldn't find shuttle SDK"