

dex files and all other resources into single apk file. That bytecode is supported by all android devices to run your app. dex(Dalvik Executable files) files, which includes bytecode. In the build process, the compiler takes the source code, resources, external libraries JAR files and AndroidManifest.xml(which contains the meta-data about the application) and convert them into.

The build process works as shown in the below diagram. There are two adle files for every android studio project of which, one is for application and other is for project level(module level) build files.

Whenever you click on Run button in android studio, a gradle task automatically triggers and starts building the project and after gradle completes its task, app starts running in AVD or in the connected device.Ī build system like Gradle is not a compiler, linker etc, but it controls and supervises the operation of compilation, linking of files, running test cases, and eventually bundling the code into an apk file for your Android Application. dex files and hence running the app on the device.Īs Android Studio comes with Gradle system pre-installed, there is no need to install additional runtime softwares to build our project. Gradle is a build system, which is responsible for code compilation, testing, deployment and conversion of the code into. Every android application development tool has to compile resources, java source code, external libraries and combine them into a final APK. Before Android Studio, in Eclipse we used to compile and build the applications using command line tool which was soon taken over by GUI based steps to build and run Android Applications in eclipse using ANT. In Android Studio, Gradle is used for building our android application projects, hence playing the role of a build system.

