I'm creating an ultra portable app development setup with a Raspberry Pi 4 8GB. Since Android Studio is not compatible with ARM I have installed VS Code and installing the Android SDK manually. Here's what I have so far:
- Installed Ubuntu to the Raspberry Pi
- Installed Flutter 2.4 using
snap - Installed Chromium and pointed
CHROME_EXECUTABLEto it in.bashrc - Installed VS Code with Dart and Flutter plugins
- Installed the Android SDK using
apt install android-sdk - Installed the Android Command Line Tools from here and added them to my PATH
- Installed
platform-tools,platforms;android-28andbuild-tools;28.0.3usingsdkmanager --install - Agreed to Android licenses using
flutter doctor --android-licenses
However when I plug my phone in (previously used for debugging with my laptop running Android Studio), flutter devices doesn't detect it, it only shows Chrome as a device. In VS Code when I go to debug, I therefore only get Chrome as an option, which incidentally does work fine for web debugging. My phone has "USB debugging is on" on the handset.
A few things I noticed are:
Despite installing the command line tools, they are completely ommited from
flutter doctor(see output below). As far as I can tell they are installed but I am not sure if I need to add something to my.bashrc?I tried setting up an emulator but
emulatorisn't available as a package fromsdkmanagerand VS Code saysavdmanager is missing from the Android SDKwhen try to create one through there. I didn't pursue this since I expect that would be a bit heavy for the pi anyway so rather debug on my actual device. I just presume that the emulator doesn't supprt ARM or something.If I enter
which adbinto terminal I get/usr/bin/adbrather than/usr/lib/android-sdk/platform-tools/adb. Both seem to work and this is the output ofadb devices:
List of devices attached
6369e875 device
Here is the output of flutter doctor -v
[✓] Flutter (Channel master, 2.4.0-5.0.pre.122, on Ubuntu 21.04 5.11.0-1012-raspi, locale en_GB.UTF-8)
• Flutter version 2.4.0-5.0.pre.122 at /home/user/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5acf7e98f1 (17 hours ago), 2021-07-20 19:58:58 -0700
• Engine revision 9b270621e4
• Dart version 2.14.0 (build 2.14.0-338.0.dev)
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = /snap/bin/chromium
[✓] VS Code (version 1.58.2)
• VS Code at /usr/share/code
• Flutter extension version 3.24.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Chromium 91.0.4472.164 snap
• No issues found!
I'm two days into this already and I've learned a lot but I'm reaching the point now where I'm a little stuck so any help is greatly appreciated and hopefully what I've done so far can help someone in the future
To be clear my problem is that my device doesn't appear in flutter devices and I can't debug with it in VS Code
I also tried flutter config --enable-android but still no show. I can run sdkmanager avdmanager adb all from the terminal but flutter does not show that there's any android toolchain present. Please help