Hello All,
My target ARM64 device (i.MX8) is equipped with a limited amount of RAM (1GB).
Installing Flutter and running flutter doctor causes an OutOfMemory exception (I even tried adding swap via a USB SSD).
As a last attempt, I am trying to use the Yocto SDK for my platform to cross-compile on x86, but I am stuck with a missing GTK 3.0 library issue—even though it exists in the SDK:
cross-flutter$flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.4, on Ubuntu 24.04.1 LTS 6.8.0-51-generic, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: Download Android Studio & App Tools - Android Developers
On first launch it will assist you in installing the Android SDK components.
(or visit Make Android apps | Flutter 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 (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✗] Linux toolchain - develop for Linux desktop
✗ GTK 3.0 development libraries are required for Linux development.
They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[!] Android Studio (not installed)
[✓] Connected device (1 available)
[✓] Network resources
! Doctor found issues in 4 categories.
However, running pkg-config --modversion gtk+-3.0
inside my cross-compilation environment confirms that GTK 3.0 is available:
cross-flutter$ pkg-config --modversion gtk±3.0
3.24.41
I also tried compiling the Flutter app inside an x86 Docker container for ARM64. The compilation succeeded, and I was able to install the app on the target platform.
However, after launching it:
It did not show any errors
The title bar was displayed correctly
The screen content was completely black
Question:
Do you have any ideas on how to successfully cross-compile my Flutter app for the i.MX8 platform, targeting either Ubuntu or imx-image-multimedia?