<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lenni Migios</title>
    <description>The latest articles on DEV Community by Lenni Migios (@lenni_migios).</description>
    <link>https://dev.to/lenni_migios</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3295895%2F075110e8-67ab-4636-991c-7195f2fa497d.png</url>
      <title>DEV Community: Lenni Migios</title>
      <link>https://dev.to/lenni_migios</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lenni_migios"/>
    <language>en</language>
    <item>
      <title>Flutter Android setup on Arch Linux</title>
      <dc:creator>Lenni Migios</dc:creator>
      <pubDate>Thu, 26 Jun 2025 07:48:34 +0000</pubDate>
      <link>https://dev.to/lenni_migios/flutter-android-setup-on-arch-linux-288f</link>
      <guid>https://dev.to/lenni_migios/flutter-android-setup-on-arch-linux-288f</guid>
      <description>&lt;h3&gt;
  
  
  What is Flutter?
&lt;/h3&gt;

&lt;p&gt;Flutter is an open-source UI framework, developed by Google that enables developers to build natively compiled applications for mobile (iOS and Android), web, desktop (Windows, macOS, and Linux), and embedded systems using a single code-base. It utilizes the Dart programming language and provides a rich set of pre-designed widgets, tools, and libraries to create visually appealing and high-performance applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Issues with installment?
&lt;/h3&gt;

&lt;p&gt;This all sounds great right, one way to design and build apps for all your favorite operating systems. However, the process of going from zero to a full installation with a android emulator in Linux is not straightforward. Personally I found the information and guides online to be at odds with each other and lacking in explanation for some of the issues I came across.&lt;/p&gt;

&lt;p&gt;This guide does not promise to solve every issue you personally may come across with your installation however. My system will likely be different to yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing Flutter
&lt;/h3&gt;

&lt;p&gt;There are multiple ways to install flutter rather. I will be using git, however direct download from the website is a good option as well.&lt;br&gt;
&lt;a href="https://docs.flutter.dev/install/manual" rel="noopener noreferrer"&gt;&lt;/a&gt;.&lt;br&gt;
&lt;em&gt;Note: avoid using the AUR.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Firstly, install flutter to the opt directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /opt
git clone https://github.com/flutter/flutter.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get flutter to work without root access you will need to change the ownership of the flutter directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo chown -R yourusername:yourusergroup flutter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get flutter commands globally, add to your PATH.&lt;br&gt;
&lt;em&gt;Note: below is for bash, change appropriately.&lt;/em&gt; for&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export PATH="/opt/flutter/bin:$PATH"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now source your configuration file or restart your terminal.&lt;br&gt;
&lt;em&gt;Note: will differ depending on system&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To test your installation run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flutter doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your result should look something like this:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuighasbmm1iywyqoh7ml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuighasbmm1iywyqoh7ml.png" alt="Image description" width="800" height="255"&gt;&lt;/a&gt;&lt;br&gt;
If there are less or more ticks on yours do not worry, they indicate the status of tools on your system. The Flutter box should be ticked however.&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting up a android emulator
&lt;/h3&gt;

&lt;p&gt;A emulator is very useful when testing your flutter applications. It allows us to get instant feedback on updates we make to our code, without uploading to a device.&lt;/p&gt;

&lt;p&gt;The best and simplest way I found to do this was by installing Android-Studio.&lt;/p&gt;

&lt;p&gt;In this case I installed it using the AUR, however again can be directly downloaded for their website.&lt;br&gt;
Downloading using yay or a equivalent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yay -Sy android-studio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The benefit of installing android-studio, is it provides a easy to use interface for managing android-sdk and emulators. &lt;/p&gt;

&lt;h4&gt;
  
  
  Troubleshooting for android-studio
&lt;/h4&gt;

&lt;p&gt;Android-Sdk not working:&lt;br&gt;
A possible reason for this is that android-sdk is installed to /opt/android-sdk by default. This automatically makes it owned by root ==&amp;gt; android-studio cannot make changes to it.&lt;/p&gt;

&lt;p&gt;Fix:&lt;br&gt;
Change owner.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /opt
sudo chown -R yourusername:yourusergroup android-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Emulator exiting with code 1:&lt;br&gt;
Could be because ANDROID_SDK_ROOT and ANDROID_HOME not assigned correctly (read error message for specifics).&lt;/p&gt;

&lt;p&gt;Fix:&lt;br&gt;
Assign either incorrect variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ANDROID_SDK_ROOT=/opt/android-sdk
export ANDROID_HOME=/opt/android-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Emulator missing a shared library:&lt;br&gt;
When using the Google Pixel 8 emulator. It would fail to start due to a missing shared library, &lt;em&gt;libbsd.so.0&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;Fix:&lt;br&gt;
Try installing with pacman (for the specific library you are missing).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pacman -S libbsd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note emulator setup for way land may require extra steps and is more involved.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Neovim integration
&lt;/h3&gt;

&lt;p&gt;With flutter and android-studio setup, you could decide to simply use VS-code which has extensive support for flutter and great extensions. However, if your like me and prefer the neovim experience the flutter-tools.nvim plugin is a great alternative. &lt;/p&gt;

&lt;p&gt;To install follow the instructions here:&lt;br&gt;
&lt;a href="https://github.com/nvim-flutter/flutter-tools.nvim" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;br&gt;
And you should be good to go!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: if using flutter-tools DO NOT use dartls.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope this has helped those of you struggling to get flutter working on Arch Linux. Thank you for your time.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
