<?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: Ikegbo Ogochukwu</title>
    <description>The latest articles on DEV Community by Ikegbo Ogochukwu (@kenryikegbo).</description>
    <link>https://dev.to/kenryikegbo</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%2F419033%2Faae23086-d49c-46ab-9295-3d17f2c343b4.png</url>
      <title>DEV Community: Ikegbo Ogochukwu</title>
      <link>https://dev.to/kenryikegbo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kenryikegbo"/>
    <language>en</language>
    <item>
      <title>Fixing a Flutter Release APK Build That Failed on Windows</title>
      <dc:creator>Ikegbo Ogochukwu</dc:creator>
      <pubDate>Thu, 16 Apr 2026 13:27:12 +0000</pubDate>
      <link>https://dev.to/kenryikegbo/-fixing-a-flutter-release-apk-build-that-failed-on-windows-41ip</link>
      <guid>https://dev.to/kenryikegbo/-fixing-a-flutter-release-apk-build-that-failed-on-windows-41ip</guid>
      <description>&lt;p&gt;&lt;strong&gt;How I diagnosed a misleading Gradle failure, separated a temporary Maven network issue from the real Android packaging problem, and fixed the release APK build with a small Gradle change&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I was building a Flutter release APK on Windows for tester distribution and ran into a confusing sequence of build failures.&lt;/p&gt;

&lt;p&gt;The first error looked like a dependency-resolution problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Could not GET 'https://repo.maven.apache.org/...'
No such host is known (repo.maven.apache.org)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That made it look like the project or Firebase setup was broken.&lt;/p&gt;

&lt;p&gt;After retrying once the network recovered, the real build blocker appeared:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Execution failed for task ':app:extractReleaseNativeSymbolTables'.
Failed to create MD5 hash for file ... libflutter.so.sym.temp-stream ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the kind of issue that wastes time because the first failure distracts you from the second one. The Maven error was temporary. The actual release-build problem was native symbol extraction during Android packaging on Windows.&lt;/p&gt;

&lt;p&gt;This post explains how I diagnosed it and the small fix that got the APK building successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  The goal
&lt;/h2&gt;

&lt;p&gt;The goal was simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;produce a signed release APK&lt;/li&gt;
&lt;li&gt;share it directly with testers&lt;/li&gt;
&lt;li&gt;avoid changing unrelated parts of the Android build&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project already had release signing configured, so this was not a keystore or package-name problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Separate the temporary network error from the real build issue
&lt;/h2&gt;

&lt;p&gt;The first failure was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Could not resolve all files for configuration ':firebase_core:releaseRuntimeClasspath'
Could not download error_prone_annotations-2.26.0.jar
No such host is known (repo.maven.apache.org)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is not a Flutter code issue.&lt;/p&gt;

&lt;p&gt;It means Gradle could not reach Maven Central at that moment. Before changing any project files, I verified whether the host was reachable from the machine.&lt;/p&gt;

&lt;p&gt;Useful checks on Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;nslookup&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repo.maven.apache.org&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Test-NetConnection&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repo.maven.apache.org&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;443&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once Maven Central was reachable again, the dependency download issue disappeared.&lt;/p&gt;

&lt;p&gt;That was important, because fixing the wrong problem would have been wasted effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Retry the build and read the next failure carefully
&lt;/h2&gt;

&lt;p&gt;After the network issue cleared, the build failed again, but with a different error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Execution failed for task ':app:extractReleaseNativeSymbolTables'.
Cannot access output property 'outputDir' of task ':app:extractReleaseNativeSymbolTables'.
Failed to create MD5 hash for file ... libflutter.so.sym.temp-stream ... as it does not exist.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pointed to Android native symbol extraction, not Firebase, not signing, and not dependency resolution.&lt;/p&gt;

&lt;p&gt;That distinction matters.&lt;/p&gt;

&lt;p&gt;By this point, the release APK build was already far enough along to show that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flutter dependencies were resolving&lt;/li&gt;
&lt;li&gt;Firebase packages were not the main blocker&lt;/li&gt;
&lt;li&gt;the Android project structure was basically valid&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The failure was happening in the release packaging phase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Identify what was actually safe to disable
&lt;/h2&gt;

&lt;p&gt;For a tester APK, I did not need packaged native debug symbols.&lt;/p&gt;

&lt;p&gt;That made the fix straightforward: disable native debug symbol packaging for the release build.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;android/app/build.gradle.kts&lt;/code&gt;, I updated the &lt;code&gt;release&lt;/code&gt; build type to set:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;ndk&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;debugSymbolLevel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"none"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The relevant release block became:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;buildTypes&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;release&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;isMinifyEnabled&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
        &lt;span class="n"&gt;isShrinkResources&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;
        &lt;span class="nf"&gt;ndk&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;debugSymbolLevel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"none"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hasKeystoreConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;signingConfig&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;signingConfigs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"release"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;signingConfig&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;signingConfigs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"debug"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was a targeted fix. It did not relax signing. It did not remove shrinking. It only stopped the build from trying to package native debug symbols that were triggering the failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Rebuild the APK
&lt;/h2&gt;

&lt;p&gt;From the Flutter project root, I reran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;flutter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;flutter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;apk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--release&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the &lt;code&gt;debugSymbolLevel = "none"&lt;/code&gt; change, the build completed successfully and produced:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build\app\outputs\flutter-apk\app-release.apk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In my case, the resulting APK was about &lt;code&gt;64.5 MB&lt;/code&gt;, which was fine for direct tester distribution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Warnings that looked scary but were not the blocker
&lt;/h2&gt;

&lt;p&gt;During the build, there were also warnings like these:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source value 8 is obsolete
target value 8 is obsolete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Font asset "MaterialIcons-Regular.otf" was tree-shaken
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those warnings were not what caused the release build to fail.&lt;/p&gt;

&lt;p&gt;It is worth calling that out because large build logs often mix harmless warnings with the real failure, and it is easy to chase the wrong thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this fix made sense
&lt;/h2&gt;

&lt;p&gt;This was a pragmatic release-build decision.&lt;/p&gt;

&lt;p&gt;For a tester APK, the priority was:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;get a stable release artifact&lt;/li&gt;
&lt;li&gt;keep minification and shrinking enabled&lt;/li&gt;
&lt;li&gt;avoid unnecessary Gradle/NDK packaging work that was failing on this environment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I were setting up a more advanced crash-symbol workflow later, I could revisit symbol generation in a more controlled release pipeline. But for immediate tester distribution, disabling native debug symbol packaging was the right tradeoff.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final takeaway
&lt;/h2&gt;

&lt;p&gt;The key lesson was not just the Gradle fix. It was the debugging sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;verify whether the first error is actually environmental&lt;/li&gt;
&lt;li&gt;retry once the environment is healthy&lt;/li&gt;
&lt;li&gt;fix the first reproducible project-level failure, not the first scary message in the log&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the Maven Central error was temporary network/DNS trouble&lt;/li&gt;
&lt;li&gt;the actual reproducible blocker was &lt;code&gt;extractReleaseNativeSymbolTables&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;the successful fix was setting &lt;code&gt;debugSymbolLevel = "none"&lt;/code&gt; in the release build&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your Flutter release APK build fails on Windows during native symbol extraction, and you do not need packaged native symbols for that build, this is a clean fix worth trying.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build command recap
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;flutter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;get&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;flutter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;apk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--release&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Gradle fix recap
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;ndk&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;debugSymbolLevel&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"none"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>flutter</category>
      <category>android</category>
      <category>gradle</category>
    </item>
    <item>
      <title>The Flutter Release Gauntlet: How to Build Your First Android APK Without the Headache</title>
      <dc:creator>Ikegbo Ogochukwu</dc:creator>
      <pubDate>Thu, 16 Apr 2026 13:03:10 +0000</pubDate>
      <link>https://dev.to/kenryikegbo/the-flutter-release-gauntlet-how-to-build-your-first-android-apk-without-the-headache-4c06</link>
      <guid>https://dev.to/kenryikegbo/the-flutter-release-gauntlet-how-to-build-your-first-android-apk-without-the-headache-4c06</guid>
      <description>&lt;p&gt;You’ve spent weeks perfecting your Flutter app. The widgets are beautiful, the state management is solid, and it runs perfectly on your emulator. But now comes the real challenge: getting it onto a real device.&lt;br&gt;
In this guide, we’ll skip the fluff and look at exactly how to build and share your first Android APK.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Quick &amp;amp; Dirty: Generating Your First APK
&lt;/h2&gt;

&lt;p&gt;If you just want to send a file to your friend or client right now, the standard command is your best friend:&lt;/p&gt;

&lt;p&gt;flutter build apk --release&lt;/p&gt;

&lt;p&gt;What’s happening here?&lt;br&gt;
Flutter is "tree-shaking" your code—removing unused resources—and compiling your Dart code into a high-performance release binary. Once finished, you’ll find your prize at:&lt;br&gt;
build/app/outputs/flutter-apk/app-release.apk.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The "Fat APK" Problem (and the Solution)
&lt;/h2&gt;

&lt;p&gt;The standard build command creates a "Fat APK," which contains code for all device architectures (arm64, armeabi, x86_64). While convenient, it makes your file size unnecessarily large.&lt;br&gt;
To create smaller, optimized files for specific devices, use:&lt;/p&gt;

&lt;p&gt;flutter build apk --split-per-abi&lt;/p&gt;

&lt;p&gt;This gives you three separate APKs. Most modern phones will use the app-arm64-v8a-release.apk version.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Signing Your App (Don't Skip This!)
&lt;/h2&gt;

&lt;p&gt;Android won’t let you install a "blank" app for long. To make your app official, you need a digital signature called a Keystore.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate the key: Use the keytool command in your terminal to create a .jks file.&lt;/li&gt;
&lt;li&gt;Reference it: Create a key.properties file in your android/ folder to store your passwords.&lt;/li&gt;
&lt;li&gt;Update Gradle: Configure your android/app/build.gradle to use these credentials during the build process.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Pro Tip: Never, ever upload your key.properties or .jks file to GitHub. Add them to your .gitignore immediately.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. APK vs. App Bundle (AAB): Which one do you need?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use APK for direct sharing (WhatsApp, Google Drive, or Slack).&lt;/li&gt;
&lt;li&gt;Use AAB (flutter build appbundle) for the Google Play Store. Google now requires AABs because they allow the store to generate the smallest possible APK for every specific user.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Final Checklist Before You Share
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Change the App Name: Update the android:label in your AndroidManifest.xml so it doesn't just say "Flutter App" on the home screen.&lt;/li&gt;
&lt;li&gt;Update the Package Name: Change com.example.yourapp to something unique like com.yourname.appname.&lt;/li&gt;
&lt;li&gt;Add an Icon: Use the flutter_launcher_icons package to replace the default Flutter logo with your own branding.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Summary Table: Your Build Toolkit&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Goal&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Quick Test&lt;/td&gt;
&lt;td&gt;flutter build apk&lt;/td&gt;
&lt;td&gt;Fat APK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small File&lt;/td&gt;
&lt;td&gt;flutter build apk --split-per-abi&lt;/td&gt;
&lt;td&gt;Multiple ABI-specific APKs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Play Store&lt;/td&gt;
&lt;td&gt;flutter build appbundle&lt;/td&gt;
&lt;td&gt;.aab file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clean Start&lt;/td&gt;
&lt;td&gt;flutter clean&lt;/td&gt;
&lt;td&gt;Clears old build files&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>androiddev</category>
    </item>
  </channel>
</rss>
