I recently switched to Fedora Silverblue. I configured everything and my Desktop is working great so far .
I now have to develop a Flutter app for a study project.
alexl lists here three possibilities to accomplish it.
The first option is not possible due to needed changes in Android Studio or Visual Studio Code. Probably through a extension vscode could be enhanced to support containerized workflow for mobile app development.
The second option would require flatpak sdk extensions for Android, Flutter and Java.
Right now there aren’t flatpak sdk extensions available for Android and Flutter. As I have not enough knowledge to build suchs flatpaks and it would require me to invest much time which I don’t have right now, this isn’t an option. Though the Java sdk extension should be useful.
I installed org.freedesktop.Sdk.Extension.openjdk11/x86_64/18.08 from flathub. So from the terminal in vscode I can navigate to /usr/lib/openjdk11/. There is a script to enable it:
#!/bin/sh export JAVA_HOME=/usr/lib/sdk/openjdk11/jvm/openjdk-11 export PATH=$PATH:/usr/lib/sdk/openjdk11/bin
But this is not working.
The third option is command invocation through flatpak-spawn --host. This seems for me the easiest approach. I downloaded the flutter sdk, set up my PATH variable and voila flatpak-spawn --host flutter doctor is detecting the flutter binary.
bash-4.4$ flatpak-spawn --host flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.0.0, on Linux, locale de_DE.UTF-8) [!] Android toolchain - develop for Android devices (Android SDK 28.0.3) ✗ No Java Development Kit (JDK) found; You must have the environment variable JAVA_HOME set and the java binary in your PATH. You can download the JDK from https://www.oracle.com/technetwork/java/javase/downloads/. [!] Android Studio (not installed) [!] Connected device ! No devices available ! Doctor found issues in 3 categories.
Because this trial and error approach is taking quite some time I thought maybe someone else has already setup his flutter development environment.
So can anyone help me to set up a flutter development environment with Android Studio or Visual Studio Code?
Thanks in Advance