Why Meta Is Rewriting Its Android Apps in Kotlin – Insights for Developers

Meta is converting its flagship Android apps from Java to Kotlin, citing benefits like reduced code size, safety, and better concurrency support, while navigating tooling challenges and showing a broader industry shift toward Kotlin for mobile development.

21CTO
21CTO
21CTO
Why Meta Is Rewriting Its Android Apps in Kotlin – Insights for Developers

Meta, the parent company of Facebook, is migrating the Java code of its Android applications to Kotlin, a newer language that also runs on the Java Virtual Machine.

Kotlin was created by JetBrains and first released in 2011; version 1.0 arrived in 2016. Google adopted it as the preferred language for Android development in 2017 and co‑funds the Kotlin foundation together with JetBrains.

Historically most Android apps were written in Java. In May 2019 Google began urging developers to use Kotlin instead, and by the end of the year 60 % of the top 1,000 Android apps included Kotlin code.

Google promotes Kotlin because it is more concise, safer, supports structured concurrency for easier asynchronous code, and interoperates seamlessly with Java—factors also tied to the long‑running Oracle litigation over Java APIs.

According to Meta software engineer Omer Strulovich, the company has replaced Java source in several of its popular Android apps—Facebook, Instagram, Messenger, Portal, and Quest—by moving them to Kotlin.

Strulovich notes that Kotlin’s popularity now exceeds Java’s in the annual Stack Overflow developer survey, making it the language of choice for Android development at Meta.

Nevertheless, Kotlin’s adoption in the broader Android ecosystem remains limited compared with Java.

Kotlin offers practical advantages such as null‑safety (preventing null‑reference errors), functional‑programming features via inline functions and lambdas, more concise syntax, and support for domain‑specific languages.

It also has drawbacks: mixed codebases can be harder to maintain, the tooling ecosystem is less mature, and internal tools like Meta’s Redex bytecode optimizer and the Pygments syntax manager needed updates to handle Kotlin.

Instead of writing new software solely in Kotlin, Meta chose to convert its existing Android applications.

Each of Meta’s Android apps now contains over one million lines of Kotlin code, with the total Android codebase exceeding ten million Kotlin lines.

While the exact start date of the migration was not disclosed, Meta developers discussed the large‑scale use of Kotlin at a conference last year.

The migration has yielded measurable benefits: on average, code line counts dropped by 11 %, largely because UI‑related code remained unchanged regardless of language.

Performance has not regressed; build sizes have not become an issue, although build times have been affected.

Meta’s migration is accelerating, and Java’s popularity has declined by about 4.7 % over the past five years.

Strulovich acknowledges that Kotlin still lacks some optimizations familiar from Java, but Meta is working to close those gaps and plans to contribute improvements back to the community.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

AndroidKotlinMetaJava migration
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.