Install flutter in jetson nano orin


sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
sudo apt install ./download/code_1.75.1-1675892106_arm64.deb
sudo snap install flutter --classic
flutter sdk-path
CHROME_EXECUTABLE=/snap/bin/chromium
export CHROME_EXECUTABLE
flutter doctor

2023/12/16 13:44:49.982088 cmd_run.go:1046: WARNING: cannot create user data directory: failed to verify SELinux context of /home/shb/snap: exec: "matchpathcon": executable file not found in $PATH
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.18.0-11.0.pre.83, on Ubuntu 20.04.6 LTS 5.10.104-tegra, locale ko_KR.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.85.1)
[✓] Connected device (2 available)
[✓] Network resources

위 커멘드를 하나씩 입력하면 jetson nano orin에서 flutter가 설치 된다.

참고 사항

  1. 크롬 브라우저는 없어서 크로미움으로 대체 하자.
  2. 안드로이드 스튜디오 및 툴 체인은 설치할 수 없으므로 나두자.
  3. flutter 실행할 때, snap 관련 오류가 나오는데, 이런 flutter와 무관하니 일단 본 포스팅에는 누락한다.
  4. 우분투 22 데스크톱 버전에서 했다.
  5. lightdm에서는 안해 봐서 어떻게 동작할지 모르겠다.
  6. GPIO 등 통신 부분 라이브러리를 써 보고 추후 포스팅해보겠다.
  7. 우분투 22인 경우 libstdc++-12-dev, 우분투 20인 경우 libstdc++-10-dev 을 설치하자.