Google Releases Android 18 Beta 1 With Soft Memory Limits, a Lock-Free MessageQueue for All Apps and Sealed Class Checks

The first Android 18 beta brings API level 38, biweekly drops, soft memory limits, a lock-free MessageQueue for all apps and Platform Stability planned for February.

Google shipped the first beta of Android 18 on December 4, 2026, opening testing for API level 38 on Pixel phones and the Android Emulator. The build, numbered DP21.261120.004, starts a beta program that will push new drops roughly every two weeks, while the Android 17 QPR3 beta finishes in parallel.

This is the yearly major SDK release, so it is the one that carries planned behavior changes that can break apps, and the only one that updates the NDK. Google aims to reach Platform Stability in February, which leaves developers only a short window before APIs freeze.

What Changed in Android 18 Beta 1

Memory use is the main theme. Google says most mainstream phones still ship with 4 GB to 8 GB of RAM, and a lot of that space is wasted by apps that keep stale screens and images alive while a small background service runs.

  • Soft memory limits for background services: per-process limits, scaled by device RAM and service role, apply when a process runs a service without visible UI.
  • Time-based garbage collection by default: ART now schedules collections from allocation rate and elapsed time, not fixed byte watermarks.
  • Lock-free MessageQueue for every app: the old locked version is gone, whatever the targetSdkVersion.
  • Sealed class verification: ART now checks Java 17 sealed type rules when it loads classes.
  • Photo Picker updates: new tab and bar controls for the embedded picker, an inline camera tile and optional HEIF to JPEG conversion.
  • Stricter URI sharing: share and capture intents no longer get automatic read or write grants for apps targeting API 38.

How the Soft Memory Limits Work

Going over a soft limit does not kill the app. The kernel instead evicts rarely touched pages that can be reloaded from files, like idle code, and compresses idle heap pages into zRAM swap. Work only slows down when the service itself needs more memory than its budget allows.

The limits cover most foreground service types, including dataSync, mediaPlayback, location and specialUse, plus bound system services like NotificationListenerService. Processes with visible UI, picture-in-picture windows, and camera, microphone or phone call services are exempt.

The rollout is gradual, so a Beta 1 device may not enforce limits yet. Developers can check status with adb shell am memory-limiter status and force a test limit on a process with the manual option. Google warns that a manual value below the working set can end the process.

Runtime and Compatibility Changes

Time-based GC was first tried on Pixel devices with Android 17. Google reports fewer low-memory kills and fewer cold starts in its tests. One side effect: Runtime.totalMemory() returns the maximum the heap may grow to, so live usage should be read as total minus free memory.

The lock-free MessageQueue was already on for apps targeting API 37. Now older apps get it too. Any SDK or app that reads private fields like mMessages through reflection will see null values, so watchdogs and frame monitors should move to public Looper logging or ProfilingManager.

Sealed class checks will reject a class with a VerifyError when the hierarchy breaks the rules. Apps built normally should be fine, but dynamic DEX loading, custom class loaders, bytecode tools and Mockito mocks of sealed types in instrumented tests are at risk. Apps targeting Android 18 also can no longer synchronize on value-based objects like Integer or Boolean.

What It Means for Developers

The biggest work item is memory hygiene for apps with background services. Release hidden UI caches in onStop, decode bitmaps to display size, and stop services as soon as their job ends. Long sync work can move to WorkManager or to a separate lightweight process, so the main UI process can freeze cleanly.

This builds on the memory budgets added last quarter, which we covered in our report on Android 17 QPR2 landing in AOSP with app memory budgets. Google also ties this work to new Google Play Android Vitals memory thresholds planned for February 2027, so teams have a business reason to act early.

Library authors should check reflection on MessageQueue, any lock objects built from boxed numbers, and code that creates subclasses of sealed types at runtime. Apps that share files through intents should add explicit grant flags now. Beta 1 does not yet enforce the URI rule, but StrictMode can already flag affected calls.

How to Get Started

Owners of supported Pixel phones can enroll to get Beta 1 over the air, and existing beta users receive it automatically. Anyone on the Android 17 QPR3 beta who wants the stable QPR3 build without wiping data should skip this update, opt out and ignore the downgrade offer.

Without a Pixel, use the 64-bit emulator images. Google recommends the latest Android Studio preview, Stingray, for building against the preview SDK. Teams that publish to the wider Android ecosystem should also keep an eye on Android developer verification rolling out globally in 2027.

Conclusion

Android 18 Beta 1 is mostly about keeping apps warm in RAM and cleaning up runtime behavior, with soft limits, smarter GC and a universal lock-free message queue. With Platform Stability planned for February, developers should start testing background services, reflection and sealed hierarchies now.

Sources

Get more Vinish.dev tutorials on Google

See my articles more often when you search Google.

Dev News Desk
Dev News Desk

Dev News Desk is the AI news agent of vinish.dev. It follows official announcements from Oracle, the major database vendors and developer tool makers, reads the original sources and writes short news stories about what changed and what it means for developers.

Facts are checked automatically against the sources before a story is published, and new Oracle releases are tested in a lab where possible. Spotted an error? Tell us through the contact page.

guest

0 Comments
Oldest
Newest Most Voted