<?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: Emre P.</title>
    <description>The latest articles on DEV Community by Emre P. (@devemrep).</description>
    <link>https://dev.to/devemrep</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4134272%2Fda137223-d371-423b-9d47-3afa8e5a2379.png</url>
      <title>DEV Community: Emre P.</title>
      <link>https://dev.to/devemrep</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devemrep"/>
    <language>en</language>
    <item>
      <title>I upgraded three Flutter apps to API 36. Here is what actually broke</title>
      <dc:creator>Emre P.</dc:creator>
      <pubDate>Sun, 20 Sep 2026 15:37:00 +0000</pubDate>
      <link>https://dev.to/devemrep/i-upgraded-three-flutter-apps-to-api-36-here-is-what-actually-broke-1dgd</link>
      <guid>https://dev.to/devemrep/i-upgraded-three-flutter-apps-to-api-36-here-is-what-actually-broke-1dgd</guid>
      <description>&lt;p&gt;Google Play's deadline passed on August 31, 2026. Since that date you cannot publish an update to an existing app unless it targets Android 16, API level 36. Not a new app. Any update. A five year old app with a hundred thousand installs cannot ship a one line crash fix until &lt;code&gt;targetSdk&lt;/code&gt; goes to 36.&lt;/p&gt;

&lt;p&gt;You can request an extension until November 1, 2026, which buys you six weeks and nothing else. The work is the same.&lt;/p&gt;

&lt;p&gt;I went through this on three of my own apps: a prayer times app, a jewelry store SaaS and a puzzle game. Changing two numbers in &lt;code&gt;build.gradle.kts&lt;/code&gt; took about a minute. Everything after that took two days. Here is the list, in the order it cost me time.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The release build broke and debug did not
&lt;/h2&gt;

&lt;p&gt;This one is the reason I am writing the post.&lt;/p&gt;

&lt;p&gt;My prayer times app schedules a notification for each prayer. In debug everything worked. In release the notifications simply never fired, with no crash and no log line. The app looked fine. People just stopped getting notified.&lt;/p&gt;

&lt;p&gt;The cause was R8. &lt;code&gt;flutter_local_notifications&lt;/code&gt; serializes its scheduled notification data with Gson, and Gson needs generic type information at runtime. R8 stripped it, so &lt;code&gt;zonedSchedule&lt;/code&gt; threw &lt;code&gt;RuntimeException: Missing type parameter&lt;/code&gt; deep inside the plugin, and the exception was swallowed by my own state handling. Immediate notifications kept working, because &lt;code&gt;show()&lt;/code&gt; does not go through Gson. That difference is what made it so confusing.&lt;/p&gt;

&lt;p&gt;The fix is a few lines in &lt;code&gt;proguard-rules.pro&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;-keepattributes Signature
-keep class com.dexterous.** { *; }
-keep class * extends com.google.gson.reflect.TypeToken
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turning off minification also "fixes" it, and that is the advice you find in most issue threads. It is a bad trade. With the keep rules in place and minification back on, my dex went from 14.8 MB to 2.0 MB and the APK from 60.2 MB to 55.1 MB.&lt;/p&gt;

&lt;p&gt;If you take one thing from this post: &lt;strong&gt;build the release version and install it on a real device before you upload.&lt;/strong&gt; Debug builds hide this entire class of bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Plugins that no longer compile
&lt;/h2&gt;

&lt;p&gt;Anything unmaintained since 2023 is a coin flip on the current Android Gradle Plugin. In two cases I replaced the plugin instead of forking it, because a package that has not seen a commit in three years will break again at the next deadline, and there is another deadline every year.&lt;/p&gt;

&lt;p&gt;Before you start, run &lt;code&gt;flutter pub outdated&lt;/code&gt; and look at the packages with no recent releases. Those are your real work items, not the SDK number.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Gradle, AGP and Kotlin disagreeing
&lt;/h2&gt;

&lt;p&gt;Bumping one of the three and not the others produces errors that point at the wrong thing. You get a Kotlin compile error that is actually an AGP version problem, or a Gradle daemon failure that is actually a JDK mismatch.&lt;/p&gt;

&lt;p&gt;Do them together, check the official compatibility table, and pin the Java version in &lt;code&gt;gradle.properties&lt;/code&gt; so your machine and CI agree.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The Data safety form drifts
&lt;/h2&gt;

&lt;p&gt;Your app now pulls newer SDK versions, and newer SDK versions collect different things. The form you filled in two years ago no longer matches what your app actually does, and Play checks this.&lt;/p&gt;

&lt;p&gt;Go through the form again with your current dependency list in front of you, especially advertising IDs, crash reporting and analytics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Permissions and service types
&lt;/h2&gt;

&lt;p&gt;Declarations that were fine two API levels ago now need to be explicit. Foreground services need a type. Notifications need a runtime permission. Exact alarms need a separate one, and on Samsung and Xiaomi devices battery optimization will still kill your scheduled work unless you handle it.&lt;/p&gt;

&lt;p&gt;The permission audit is also a good moment to delete what you are no longer using. Every permission you remove is one less question on the Data safety form.&lt;/p&gt;

&lt;h2&gt;
  
  
  A checklist you can actually use
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;targetSdk&lt;/code&gt; and &lt;code&gt;compileSdk&lt;/code&gt; to 36&lt;/li&gt;
&lt;li&gt;Gradle, AGP and Kotlin to compatible versions, pinned JDK&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;flutter pub outdated&lt;/code&gt;, upgrade or replace the dead packages&lt;/li&gt;
&lt;li&gt;Build the release AAB, install it on a real device, exercise the features that rely on background work&lt;/li&gt;
&lt;li&gt;Check keep rules if anything silently misbehaves only in release&lt;/li&gt;
&lt;li&gt;Permission audit, then update the Data safety form&lt;/li&gt;
&lt;li&gt;Upload to a closed test track first, not straight to production&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  If you are stuck
&lt;/h2&gt;

&lt;p&gt;Most of the pain here is not the SDK bump, it is the archaeology in a project nobody has touched in two years. If your app is blocked and you are hitting one of these, leave a comment with the error and I will tell you what worked for me.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>android</category>
      <category>googleplay</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
