How to cross-build a flutter app from Linux x64 host to Linux arm64

2.4k views Asked by At

I am trying to compile from linux-x64 to linux-arm64. When I type flutter build linux --target-platform linux-arm64 I get this error: Cross-build from Linux x64 host to Linux arm64 target is not currently supported.

I need to know if I have to install something specific tool on my PC to do the compilation.

The uname -a of my pc is: Linux jaime-Inspiron-3537 5.4.0-124-generic #140~18.04.1-Ubuntu SMP Fri Aug 5 11:43:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

this is my flutter doctor -v

[✓] Flutter (Channel stable, 3.3.10, on Ubuntu 18.04.5 LTS 5.4.0-124-generic, locale es_CU)
    • Flutter version 3.3.10 on channel stable at /home/jaime/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (hace 3 semanas), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✗] 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
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] VS Code (version 1.67.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.56.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 18.04.5 LTS 5.4.0-124-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 93.0.4577.63

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

0

There are 0 answers