◉RORK LABJP
●EXPO 58 — Expo is still on expo@58.0.25 (11/12), with no newer release yet●RORK — The rork.com changelog still shows 9/29 as its latest entry●GEMINI 2.5 — gemini-2.5-flash and pro shut down on the API on 12/1, 14 days left. Allow for review time if model names ship in your app●AGE RANGE — Developers ask how to tell apart the three new iOS 27 age-range errors in their apps●WATERMARK — Claude-generated text carries a watermark from 11/16; worth checking if your app ships AI-written copy●NEW — Turning Off cameraPermission Broke QR Scanning●EXPO 58 — Expo is still on expo@58.0.25 (11/12), with no newer release yet●RORK — The rork.com changelog still shows 9/29 as its latest entry●GEMINI 2.5 — gemini-2.5-flash and pro shut down on the API on 12/1, 14 days left. Allow for review time if model names ship in your app●AGE RANGE — Developers ask how to tell apart the three new iOS 27 age-range errors in their apps●WATERMARK — Claude-generated text carries a watermark from 11/16; worth checking if your app ships AI-written copy●NEW — Turning Off cameraPermission Broke QR Scanning
Articles/Dev Tools
⬡ Dev Tools/2026-05-15Intermediate

Rork Max Android App Crashes Only on Older OS Versions: Java 8 Desugaring Fix

Diagnose why your Rork Max Android app crashes only on older OS versions (Android 6–8) and fix it permanently with Java 8 core library desugaring. Includes the two cases where the fix alone was not enough.

Rork Max236Android66crash7Java 8desugaringtroubleshooting80AGP

The morning after I shipped v2.1.0 of my Android wallpaper app, Firebase Crashlytics had a few new red lines I didn't recognize:

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/function/Supplier;

Every report came from Android 6.0.1. My first thought was "old devices, nothing I can do," and I let half a day go by on that assumption. It was the most expensive mistake in this whole episode, because the real cause was a missing build setting.

Rork Max projects can end up with Glide 5.x, AGP 9.x and other modern libraries that use Java 8 APIs internally. Devices older than Android 7.0 (API 24) or 8.0 (API 26) can't resolve those classes natively, so a slice of your users simply can't open the app.

I'll walk through what the fix looked like for me, including the two times it wasn't enough.

Why "Only Old OS Versions" Crash

Android's Java API support varies by version. Classes like Stream, Optional, and Supplier — added in Java 8 — are only natively available from API 24, and java.time from API 26.

Rork Max targets modern Android, so the generated code and its dependencies freely use these APIs. On older devices the runtime can't resolve them, and the app dies on launch.

In the 28 days after the v2.0.0 release, 50+ NoClassDefFoundError reports piled up and the Crash-free users rate slid to 99.4%. Not catastrophic on paper, but enough to drag Play Store ratings down if left alone — and none of it reproduced on my own test devices.

Knowing which classes sit right on the boundary makes the stack trace readable at a glance:

APINative supportHow it usually sneaks in
java.util.function.Supplier / ConsumerAPI 24+Glide 5.x internals
java.util.stream.StreamAPI 24+Utility libraries
java.util.OptionalAPI 24+Parts of the Firebase SDK
java.time.* (LocalDate etc.)API 26+Hand-rolled date handling
java.nio.file.*Not covered by defaultGenerated file I/O code

If the class after Failed resolution of: appears in that table, this is a missing build setting — not a broken device.

Step 1: Pinpoint the Crash in Firebase Crashlytics

Open the Crashlytics dashboard and look at the Issues tab. Click into the NoClassDefFoundError issue and check the "Session details" for device OS distribution.

If you see a clear pattern — "mostly Android 6.x, 7.x, 8.x" — the Java 8 desugaring problem is almost certainly your culprit.

Signals that point to desugaring issues:
- OS version: concentrated below Android 8.0 (API 26)
- Error type: NoClassDefFoundError, ClassNotFoundException
- Library involvement: Glide, Firebase SDK, OkHttp in the stack trace

For Rork Max projects, navigate to android/app/build.gradle after ejecting from the Expo managed workflow.

Step 2: Add Desugaring to app/build.gradle

Open android/app/build.gradle. You'll likely already see this:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Setting sourceCompatibility to VERSION_1_8 tells the compiler to accept Java 8 syntax — but it does not make Java 8 runtime APIs available on older devices. That requires explicitly enabling core library desugaring:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
        // Enable desugaring for Android 8.0 (API 26) and below
        coreLibraryDesugaringEnabled true
    }
}
 
dependencies {
    // Add the desugaring library
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
    // ... existing dependencies
}

After adding these two lines, the app started cleanly on an Android 6.0.1 emulator. The change is tiny; the half day I spent blaming old hardware is what cost me.

If your project uses build.gradle.kts, the syntax is isCoreLibraryDesugaringEnabled = true and coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4"). Check which flavor your generated project uses before pasting anything.

Step 3: How to Ask Rork's AI to Apply This Fix

When asking Rork to make this change, give it the exact file, the exact lines, and the exact error from Crashlytics. Vague requests like "fix the crash" tend to trigger broader rewrites you don't want.

[Prompt for Rork]

In android/app/build.gradle, please:
1. Add coreLibraryDesugaringEnabled true inside compileOptions
2. Add this to the dependencies block:
   coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

Firebase Crashlytics is reporting this error on Android 8.0 and below:
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/util/function/Supplier;

Do not modify any other files.

The "do not modify any other files" line earns its place. Once I left the scope open and the AI bumped a dependency version on its own, which sent me back to square one on diagnosis. Now I close the scope in the prompt first.

Two Cases Where Desugaring Alone Did Not Fix It

Twice the crashes survived the fix. Both times the cause sat outside compileOptions.

R8 shrinking. With minifyEnabled true, the desugared classes were obfuscated and reflective lookups stopped resolving. Desugared classes land under a j$ prefix, so any keep rule written against java.* misses them entirely. Recent AGP versions may add these rules for you, so first check whether a release build on a real device still reproduces the crash.

-keep class j$.util.** { *; }
-keep class j$.time.** { *; }
-dontwarn java.lang.invoke.**

Stale build cache. The build right after the change reused old dex output, so the crash reproduced on a build that should have been fixed. Always force a clean rebuild after touching desugaring:

cd android && ./gradlew clean
./gradlew assembleRelease --rerun-tasks

Raising minSdkVersion is the other option, and it is tempting. Check the Android version distribution in Google Play Console first. In my app, devices below API 24 were 1.8% of the base, which made one build setting a far better trade than cutting those people loose.

Step 4: Watch for AGP and Glide Version Combinations

AGP 9.x paired with Glide 5.0.x is a particularly common trigger for this problem. If you're using AGP 9.x, make sure desugar_jdk_libs is at version 2.0.4 or later — older versions can leave some Java 8 APIs unconverted.

If you're using Glide's Kotlin-based API or Coroutines integration, these also pull in Java 8 types. The desugaring setting covers all of them once enabled.

Before You Blame the Old Phone

When only older Android versions crash, look at the OS distribution in Crashlytics first. If the reports cluster below Android 8.0 and NoClassDefFoundError shows up repeatedly, coreLibraryDesugaringEnabled plus the desugar_jdk_libs dependency settles most cases.

Suspect the build settings before you suspect the device. That's the line I drew for myself after losing half a day to the wrong theory.

On release day I also hold each staged rollout phase until Crash-free users sits above 99.7%; this one was caught before the rollout reached 25%. And whenever I add a feature, I boot an API 24 emulator just to confirm the app launches.

Open your compileOptions today and check whether the desugaring line is there.

Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ Dev Tools2026-10-25
Sound Effects Stop at Play #40 — With expo-audio's createAudioPlayer, remove() Alone Isn't Cleanup
Creating a createAudioPlayer instance per play in expo-audio can leave Android silent after about 40 plays, with didJustFinish never arriving. What remove() and release() each do, three ways to restructure, and how to notice when it happens.
⬡ Dev Tools2026-10-24
The ANR Was Coming From Cleanup When a Screen Closed: Classifying the Blocking Line From Traces
A Python script that reads Android ANR traces and classifies the line that blocked the main thread, such as billing client teardown or synchronous image decoding. Two causes I found in my wallpaper apps, and the thinking behind the fixes.
⬡ Dev Tools2026-10-22
A Video Fails to Save with "Not Enough Space" — Check Whether the File Is Over 2GB Before Blaming Storage
On Android, a 2.2GB video won't save to the gallery and the error says "Not enough space", even with plenty of free storage. I read the public Expo issue and reproduced the same boundary on Linux. Here is a size check to add before saving, and the idea of copying in pieces.