<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u" -->

---
title: Ever Wonder How APKs Get Generated? Understanding What...
description: A walkthrough of how Android APKs are generated from both Kotlin and Dart (Flutter) source code. For native Android, Kotlin is compiled to JVM bytecode via...
canonical: https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Ever Wonder How APKs Get Generated? Understanding What Happens to Kotlin and Dart Code | daily.dev
og:description: A walkthrough of how Android APKs are generated from both Kotlin and Dart (Flutter) source code. For native Android, Kotlin is compiled to JVM bytecode via...
og:url: https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u
og:image: https://api.daily.dev/og/posts/oMIbsgA8u.png
og:image:alt: Ever Wonder How APKs Get Generated? Understanding What Happens to Kotlin and Dart Code
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Ever Wonder How APKs Get Generated? Understanding What Happens to Kotlin and Dart Code

**[Medium](https://daily.dev/sources/medium_js)** · 5 min read · 0 upvotes · 0 comments

## Summary

A walkthrough of how Android APKs are generated from both Kotlin and Dart (Flutter) source code. For native Android, Kotlin is compiled to JVM bytecode via kotlinc, then converted to DEX format by the D8 compiler, packaged with resources by Gradle, and signed before installation. At runtime, ART compiles DEX to native machine code. Flutter takes a different path: during development it uses JIT compilation via the Dart VM (enabling Hot Reload), while release builds use AOT compilation to produce native ARM machine code directly. The Flutter Engine is bundled inside the APK to handle rendering independently of Android's UI toolkit, which explains why Flutter APKs are larger than native ones. Key misconceptions are addressed: Dart is not converted to Java, and Kotlin is not compiled directly to machine code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@zahid.muneer/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-4df4a8e34b5b>

## Similar posts on daily.dev

- [I Was Wrong About APK vs AAB for Years — Here’s What Actually Happens](https://daily.dev/posts/i-was-wrong-about-apk-vs-aab-for-years-here-s-what-actually-happens-akzeducky) · Medium · 1 upvotes · 0 comments
- [Same CPU, Five Times the Memory: What Flutter Really Costs](https://daily.dev/posts/same-cpu-five-times-the-memory-what-flutter-really-costs-mxl2xhlu1) · Medium · 0 upvotes · 0 comments

---

Tags: [#android](https://daily.dev/tags/android), [#flutter](https://daily.dev/tags/flutter), [#kotlin](https://daily.dev/tags/kotlin), [#dart](https://daily.dev/tags/dart)

[View this post on daily.dev](https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Ever Wonder How APKs Get Generated? Understanding What Happens to Kotlin and Dart Code","url":"https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u"},"datePublished":"2026-07-18T09:18:13.546Z","dateModified":"2026-07-18T09:20:50.089Z","description":"A walkthrough of how Android APKs are generated from both Kotlin and Dart (Flutter) source code. For native Android, Kotlin is compiled to JVM bytecode via...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/31e0fcc3aa7691c77985069dd222137f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/31e0fcc3aa7691c77985069dd222137f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/ever-wonder-how-apks-get-generated-understanding-what-happens-to-kotlin-and-dart-code-omibsga8u","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"android,flutter,kotlin,dart","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Ever Wonder How APKs Get Generated? Understanding What Happens to Kotlin and Dart Code"}]}
```

