我在Debian 10 ARM64嵌入式设备上运行Flutter,出现一些问题

问题描述 投票:0回答:1

我不知道如何在嵌入式设备中运行flutter demo;这是索尼的 wiki https://github.com/sony/flutter-elinux/wiki/Building-flutter-apps

这是我的设备详细信息,环境是

$lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
$ uname -a
Linux linaro-alip 4.19.193 #2 SMP Tue Jul 5 10:08:34 UTC 2022 aarch64 GNU/Linux

因为flutter-elinux不是flutter的office环境,所以第一个错误无法运行fluuter通道来修复。但是,当我运行flutter-elinux创建演示成功时,但我尝试了但无法以任何方式运行他。

sample_elinux$ ls
README.md  analysis_options.yaml  android  elinux  ios  lib  linux  macos  pubspec.lock  pubspec.yaml  sample_elinux.iml  test  web  windows


$ flutter-elinux doctor -v
Flutter 3.10.5 • channel unknown • unknown source
Framework • revision 796c8ef792 (4 weeks ago) • 2023-06-13 15:51:02 -0700
Engine • revision 45f6e00911
Tools • Dart 3.0.5 • DevTools 2.23.1
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[!] Flutter (Channel unknown, 3.10.5, on Debian GNU/Linux 10 (buster) 4.19.193, locale C.UTF-8)
    ! Flutter version 3.10.5 on channel unknown at /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! The flutter binary is not on your path. Consider adding /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin to your path.
    ! The dart binary is not on your path. Consider adding /media/linaro/ef0e9ea8-873f-4819-bc21-6790e2ddc7b7/env/flutter-elinux/flutter/bin to your path.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision 796c8ef792 (4 weeks ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] eLinux toolchain - develop for embedded Linux devices
    • clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final)
    • cmake version 3.13.4
    • pkg-config version 0.29
[✗] 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 (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final)
    • cmake version 3.13.4
    • ninja version 1.8.2
    • pkg-config version 0.29

[!] 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).

[✓] Connected device (3 available)
    • Linux (desktop)  • linux          • linux-arm64    • Debian GNU/Linux 10 (buster) 4.19.193
    • eLinux (desktop) • elinux-wayland • flutter-tester • Debian GNU/Linux 10 (buster) 4.19.193
    • eLinux (desktop) • elinux-x11     • flutter-tester • Debian GNU/Linux 10 (buster) 4.19.193

运行

flutter-elinux run -d elinux
flutter-elinux build elinux --target-arch=arm64
都卡在“正在下载 elinux-common 工具...”

https://wiki.loliot.net/docs/lang/flutter/engine/flutter-app-for-linux-arm64/#targetlinux-armarm64 https://www.codetd.com/article/14721236 https://github.com/sony/flutter-elinux/wiki

关于他们的信息很少。我只能找到这些看似相关的文章。

flutter arm debian cross-platform embedded-linux
1个回答
0
投票

(代表问题作者将解决方案移至答案空间).

我通过指定网络代理解决了上述问题。下一步是验证交叉编译。不同平台的要求有很大不同,以后会有更多的疑惑。

© www.soinside.com 2019 - 2024. All rights reserved.