3. Application Journey
Code (
java/kotlin
) + Libraries + Resources ⇒ Compile ⇒DEX
Development Stage: Developers write Android applications using languages like Java or Kotlin. The code is then combined with any necessary libraries (dependencies) and resources (such as images, strings, layouts) required for the application.
Compilation: The code is compiled into Dalvik Executable (DEX) format. The DEX file contains optimized bytecode, which is executable by the Android runtime (either Dalvik VM or ART). This is a crucial step, as Android devices cannot directly run Java bytecode; they need the DEX format.
DEX
+ Build (lib + resources
) ⇒APK
APK Creation: The compiled DEX file, along with the application’s libraries (
lib
), and resources (such as images, layouts, etc.), are packaged together into a single APK file (Android Package). The APK is essentially the entire application in a format ready for distribution and installation.
APK
+ Signed (Cert) ⇒ Signed APKSigning the APK: For security and authenticity, the APK must be signed with a cryptographic certificate before it can be distributed. This signing ensures that the application comes from a trusted developer and hasn’t been tampered with.
Release Version: The signing process involves using a private key to create a digital signature, which is embedded into the APK. If the APK is intended for distribution on Google Play, it is signed with a release key. For testing or internal distribution, a debug key may be used.
Signed APK + Google Play ⇒ Installed on User Device
Google Play Distribution: Once the APK is signed, it is uploaded to Google Play Store (or any other distribution platform, like third-party stores). When a user installs the application from the store, the APK is downloaded to the user’s device.
Installation: The device installs the APK, unpacks the DEX file, libraries, and resources, and the application is now ready to be launched and executed.
Last updated