Trying to learn something new. Want to start with Flutter first. I do have some experience developing Android APP but that was a decade a ago. Using Android SDK to develop from scratch. However as time changed in a glimpse. Now its time to explore a new SDK!
Flutter~
First i followed the instructions on how to install Flutter on my linux machine
https://docs.flutter.dev/get-started/install/linux
encountered few issues.
- [!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details. - [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
Ok lets fix the first one first!
✗ cmdline-tools component is missing
This issue might due to the missing Android SDK from my machine. or miss PATH set. ok..
I checked if i did installed Android Studio before?
/opt/android-studio/bin/studio.sh
YUP. I did! made a simple web launcher app for FOODAH on 2020 aha! long time didnt touch Android Studio. Reason why i dont remember where is the SDK path, by opening the Android Studio i able to see the path set.
ok now setting the android path
vim ~/.bashrc
added the lines below~
export ANDROID_HOME=/home/alia/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
reload the bash profile
source ~/.bashrc
check the path
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/alia/Android/Sdk/tools:/home/alia/Android/Sdk/platform-tools
ok after checking the path. i still could'nt locate the SDKManager tool. Probably my installation was way back too outdated.
https://developer.android.com/studio/command-line/sdkmanager
you can find the commandline tools available for download at the bottom page
https://developer.android.com/studio
ok downloaded. and i stored the commandline tools at my sdk path.
java path and commandline-tools path is correct yaaaa
~/Android/Sdk/cmdline-tools/latest/
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
By right the first issue should solved by now!
moving to the next issue.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
settled. just accept the terms and condition.
next issue
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
set the google chrome path. to find the chrome bin path, can run this in the browser address bar 'chrome://version'
export CHROME_EXECUTABLE=/snap/chromium/1944/usr/lib/chromium-browser/chrome
finally run back the flutter doctor command yezzaa everything is ready!
alia@alia-K45VD:~/coding$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on Ubuntu 20.04.2 LTS 5.4.0-99-generic,
locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.6)
[✓] Connected device (1 available)
[✓] HTTP Host Availability
• No issues found!
Comments
Post a Comment