Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the Android build process work?

I've found a good article on how the Android build process works, which shows the following process:

enter image description here

However, I've also seen another article which says that it uses javac to convert all files to .class files, then the dx tool in the adk converts all .class files to classes.dex, like so:

enter image description here

Please can someone clarify which one is correct?

like image 313
Anirban Avatar asked Sep 23 '13 02:09

Anirban


People also ask

What exactly happens during an Android APK creation build process?

All APKs require a digital signature before they can be installed or updated on your device. For Debug builds, Android Studio automatically signs the app using the debug certificate generated by the Android SDK tools when we run. A debug Keystore and a debug certificate is automatically created.

What's the build system for Android?

The Android build system is the toolkit you use to build, test, run and package your apps. The build system can run as an integrated tool from the Android Studio menu and independently from the command line. You can use the features of the build system to: Customize, configure, and extend the build process.

How is an Android app compiled?

As we all know, Android apps can be written in Java and Kotlin programming languages. So the process of Android app compilation is based on the compilation process of Java and Kotlin code (aside from Android environment).

What are the steps involved of creation of APK file?

To generate a signed APK file, open the Build menu from the toolbar and select Generate Signed Bundle/APK. This opens up a screen where you have to select between creating an Android App Bundle and creating an APK file. Check the APK radio button and proceed to the next window.


1 Answers

You can take a look at the official document Building and Running http://developer.android.com/tools/building/index.html

like image 71
c0ming Avatar answered Nov 15 '22 18:11

c0ming