Intro
The increasing penetration of mobile devices into all spheres of life imaginable and the constant user urge to stay informed and connected on the go have been sparking companies’ interest in leveraging mobile platforms for even greater monetization and reach. Also, mobile apps help businesses conquer new markets and audiences, develop brand awareness, and become more flexible operations-wise.
No wonder the industry is expected to grow in the coming years. For example, GVR suggests that the projected mobile application industry worldwide revenue will reach US$ 626.39 billion by 2030, while Statista forecasts a projected market volume of US$781.70 billion by 2029, with a CAGR of 7.48% between 2022 and 2029.
.png)
To keep up with this continuous expansion and stand out among the competitors in the mobile app domain, it is important to follow the market trends, user concerns, and, of course, technological advances.
As competent mobile app developers, we have prepared expert material on the Android app stack and how to choose the best technologies for your project to help you ensure your Android mobile app development is quick, cost-effective, and secure.
What is a software development stack?
A software development stack is a set of technologies, such as programming languages, libraries, frameworks, services, database management systems, operating systems, and other developer tools required to build and run a software application efficiently. Also referred to as a solution stack or a technology infrastructure of an app, it consists of different types of components.
Programming Languages
Programming languages are the core element of a software tech stack. The choice of a programming language depends on product requirements and complexity as well as the available engineering expertise and ecosystem. There are various approaches to differentiating programming languages but in the context of tech stack, we can roughly specify front-end (HTML, CSS, JavaScript), back-end (Java, C++, Python, Ruby), and mobile ones (Kotlin, Swift).
Depending on the application’s components and architecture, it can involve a single or several programming languages. The choice will define the logic of how an app’s functionality will be implemented and the selection of other technologies in the stack.
Frameworks and Libraries
Frameworks and libraries are pre-written, reusable code structures and templates used to implement various software functionalities or components. Software engineers greatly benefit from software frameworks and libraries as they speed up the development process, help ensure high code quality, and meet engineering best practices and standards.
The choice of frameworks and libraries for your application will be tightly bound to the selected programming language(s). Also, just like programming languages, they are designed specifically for front-end (React, Vue, jQuery), back-end (Django, Spring Boot, Pandas), or mobile development (React Native, Xamarin, Flutter).
Databases
Databases are an important part of a solution tech stack as they are used for storing, retrieving, and securing different types of data that fuel our application. This includes input data (like user data, sensor data, or configuration data), internal data (temporary data generated during input processing, session data), and output data (stored data, user interface data).
There are two most popular groups of databases, relational or SQL databases (MySQL, PostgreSQL) and NoSQL databases (RoomDB, MongoDB, Cassandra, Redis, etc.). Which database(s) to use in your app will depend on many factors, including types and amount of data to be stored and processed, required processing speed, scalability needs, and others.
CI/CD Tools
CI/CD tools help you automate the development, testing, and deployment of your software product. They ensure your SDLC has the processes of Continuous Integration and Continuous Delivery in place. This means your engineers’ code gets merged, built, and tested regularly, avoiding integration issues piling up. Further, this enables automatic code packaging and deployment, securing high code quality, consistency, and fast delivery. Some examples of CI/CD tools include Jenkins, Tektone Pipelines, GoCD, etc.
Operating System
An operating system is the environment where your product will be developed and, in the future, will be launched. It is the layer that connects your application with the computing hardware it runs on, providing an interface, system resource and file management, and security measures. Some of them are Android, iOS, Windows, Linux, ChromeOS, etc., and the choice of the OS will be tightly related to the app’s target device and compatibility with other tech stack components.
So, as you can see, the software development stack makes a complex of different languages, systems, and tools. The question of which tech stack to choose for this or that solution should be considered on a case-by-case basis, as all of the features and tools in a software product are interconnected and affect each other.
Also, for different platforms and tasks, the tech stack will be different, but in some cases, it will be similar. For example, you can use Java programming language to develop both Android applications and web servers. In the following section, we will discuss the differences between tech stacks for mobile and web development.
What are the differences between mobile and web app tech stacks?
As we’ve mentioned above, the development of a software solution involves two main aspects – the back end (aka the server side) and the front end (aka the client side). The back end of a system includes components that support its functionality but the user cannot interact with directly (logic, data processing, storage). The front end is the part of the system that has a user interface (UI) that the user interacts with.
While the back end of a mobile and web app can be similar or even shared, the defining factor here is how users interact with an app. Users interact with mobile applications through mobile platforms (Android, iOS) while web applications are accessed via a web browser (e.g. Chrome). This means that the major distinction between mobile and web apps in terms of tech stack lies in the tools needed for front-end development to adapt their interfaces to these systems.
Web App Tech Stack
Web applications are designed to run in any or a specific web browser regardless of the device and typically depend on an internet connection. The widely used technologies in web development include HTML, CSS, JavaScript, and its frameworks React, Angular, and Vue.js. There’s also a variety of front-end libraries that help quickly develop and integrate different UI elements, especially interactive features (e.g. graphic and text editors, registration forms, charts and maps, live chats, etc.).
Mobile App Tech Stack
Mobile applications can be designed to run on different mobile platforms and the web (cross-platform) or on a specific platform (native).
Cross-platform development involves such technologies as React Native, Flutter, and Xamarin. It is usually faster and more cost-saving as it relies on code reuse and requires fewer engineers. On the other hand, cross-platform apps may lose in performance to native ones and miss out on certain native device features and requirements.
Native mobile apps can be developed using the mobile app tech stack. This includes programming languages like Swift (for iOS) and Kotlin or Java (for Android), their framework and libraries, and other compatible developer tools. Such apps will need more time, costs, and expertise variety for development, but will likely deliver a more satisfying user experience and show better performance than cross-platform apps.
Further in this article, we will be discussing the modern mobile app technology stack, specifically for the Android platform.
Having Android app development in progress and wondering about the next steps? Learn about the specifics of launching an Android app on the Google Play Store.
Technology stack for creating Android apps
The tech stack for Android app development includes a variety of software instruments, frameworks, and languages. In this chapter, we provide an overview of the key groups of technologies and developer tools that can be used on any Android development project:
- Operating systems and hardware
- Integrated development environment (IDE)
- Programming languages
- Frameworks and libraries (UI tools, dependency injection, network technologies)
Operating Systems
To start with Android development, we need a device with an operating system that can run mobile Android development tools. Luckily enough, unlike with iOS development, we can run Android SDK and the needed programming languages on Linux, Windows, or MacOS. Google provides developers with the latest Android development technology for these operating systems they can use out-of-the-box or customize for specific tasks.
Integrated development environment (IDE)
Integrated development environment (IDE) is a type of software used by developers to write code. The basic features of IDEs include a source code editor, build automation tools, and a debugger, while, additionally, they can have a compiler, interpreter, version control system, class browser, object browser, etc. IDEs can be language-specific or be used for multiple programming languages. Here are some that are commonly used as a part of the tech stack for Android app development:
Android Studio is the official and free IDE for Android application development. This is a modern IDE that now features automatic code completion and real-time audit. It is compatible with Kotlin and C++ and provides support for developer tools from Google and JetBrains, the Android emulator, and version control from GitHub and Git.
Programming languages
There are three programming languages commonly used for developing Android applications — Java, Kotlin, and Dart.
Java
Java is the first and now one of the most popular programming languages for building native Android apps. It relies on object-oriented programming, enforces secure app development, and integrates well with Java-based application back end. This programming language is in demand among developers due to the versatility of the language and ease of design.
Kotlin
Kotlin is a more modern language used in Android mobile application development. Therefore, it is a preferred programming language for new Android projects while Java is more often the language of choice for legacy products. However, Kotlin is fully interoperable with Java, meaning you can use Kotlin and Java code in one project. As a recommended alternative, it offers developers concise syntax, improved null safety, and coroutines for asynchronous programming.
Dart
Dart is a programming language used in Android development due to the Flutter UI software development kit that Google created for cross-platform development. This means software engineers can write a single codebase that can run on multiple platforms, including mobile Android and iOS, desktop Linux, Windows, macOS, and web. Flutter’s UI framework provides customizable widget-based design, ensuring consistent rendering across diverse devices by relying on its own rendering engine, Skia.
Product Discovery Lab
Free product discovery workshop to clarify your software idea, define requirements, and outline the scope of work. Request for free now.

Android UI tools:
Android developers use many different tools to create user interfaces for their mobile apps. Some more traditional tools use XML layout files to define various UI elements while modern tools provide declarative UI frameworks. Let’s take a look at some Android app development technologies for UI.
Android pre-built tools
Android provides you with standard pre-built UI tools that you can use to install the Android SDK package. This implies that you create UI using XML files, where you will define how your application will look imperatively. SDK provides many UI classes like Button, TextView, and ConstraintLayout, which XML uses to describe the application UI.
Android Jetpack Compose
Jetpack Compose is the modern UI library powered by Google, which uses the declarative method to build native UI. Unlike the XML-based tools, Jetpack Compose can be declared right in the code. To use Compose, you need to add dependencies, enable the Compose build feature, and describe the Kotlin compiler extension version in your build.gradle file, following the guide. Having completed this, you can use Jetpack Compose in your projects.
Material Design
Material Design is compatible with both pre-built XML-based UI layouts and Jetpack Compose and can provide a modern-designed UI.
Given the trend, Android Jetpack Compose has become more popular than XML in native UI building, but standard methods are still popular too.
Naturally, the technology used in Android development, in addition to UI tools, also includes network, storage, and dependency injection technologies for easier management of dependencies in project code.
Dependency Injection Technologies
Dependency injection is a design pattern used for dependency management for diverse application components. Thus, dependencies are injected from external sources, ensuring the code is modular and maintainable.
Dependency injection technologies help developers use classes more efficiently and eliminate the need to manage dependencies between classes and their “parents” or “children”. In terms of creating new class objects, this prevents memory leaks that cause excessive system resource consumption. In general, dependency injection provides such advantages as code reusability, ease of refactoring, and ease of testing. Let’s take a look at some common dependency injection tools in the Android app development stack.
Dagger Hilt
Dagger Hilt is one of the modern dependency injection libraries for Android applications. Among its benefits, it is easier to learn for beginners. You may have heard of the Dagger and Dagger 2 libraries. They require a lot of boilerplate code in your project to provide dependencies.
Hilt can help reduce the amount of such code, providing built-in components and annotations to handle dependencies. For example, if you want to use injection into your Activity or Fragment, you need to provide whatever you need with annotation @Provides and annotate Activity/Fragment with @AndroidEntryPoint annotation. After that, you can inject something with @Inject annotation. Looks much easier, here is an example:
Let’s create a class, for example, an Object class:
@Module
@InstallIn(value = [SingletoneComponent::class])
object TestObjectClass {
@Provides
fun provideStableElectricity(electricity: Electricity) : StableElectricity {
return electricity.defend().stabilize().provide()
}
}
Here, the Hilt module provides a StableElectricity object for your project. After that, you can use it in your code, for example, in Activity or Fragment. To provide a singleton object, you need to annotate the provide function with @Singleton.
@AndroidEntryPoint
class YourCityActivity : AppCompatActivity() {
@Inject
lateinit var stableElectricity: StableElectricity
override onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
…
}
}
This way, developers use the provided object with Hilt. The Hilt-Dagger annotations cheat sheet can help you with the most commonly used annotations. For more information, see the official documentation.
Koin
This is another DI framework that can be used in Android development. Koin provides developers with simple tools and API to build, assemble Kotlin-related technologies into applications, and scale your business with ease. Below is an example of how to create modules, start Koin, and inject dependencies.
- Create module:
class MainApplication : Application() {
val myModule = module {
singleOf(::MyPresenterr)
singleOf(::MyRepository)
}
override fun onCreate() {
super.onCreate()
startKoin {
// Log Koin into Android logger
androidLogger()
// Reference Android context
androidContext(this@MainApplication)
// Load modules
modules(myModule)
}
}
}
- Inject dependency:
class MyActivity : AppCompatActivity() {
val myObject : MyObject by inject()
}
And that’s it. Looks even more simple than the Hilt DI Framework! So what do we recommend? If you want improved runtime performance for your application, we advise using Dagger Hilt. Meanwhile, Koin has a much smaller impact on our build time.
What are the network technologies used in Android apps?
In Android application development, we use multiple network technologies that enable data exchange, real-time communication, security, streaming and media transfer, integration with cloud services, edge computing and IoT. However, there are several essential frameworks and libraries that should be included in almost any Android tech stack as they are responsible for HTTP and API communication: Ktor, Retrofit, and OkHttp.
Ktor
Ktor is a Kotlin framework for building asynchronous servers and clients in connected systems. It includes a multiplatform asynchronous HTTP client, which allows making requests and handling responses. Its functionality can be extended with plugins, such as authentication, JSON serialization, and others.
Ktor is very easy to configure and use, providing rapid network launch in applications. Ktor is not wired to anything Android-specific, which is a long-term advantage if you are planning to extend your Android app into a multiplatform app.
Retrofit 2
Retrofit 2 is a type-safe HTTP client for Android and Java. It is used in a wide range of Android applications accessing the network. If you have any concerns about it being outdated, we assure you Retrofit 2 is still a popular and powerful network library that is used and will be used for a long time. If you want a reliable network client in your native project, we recommend using Retrofit 2, or combining it with the OkHttp network library.
OkHttp
OkHttp is an open-source HTTP client for Android and Java applications. It can be smoothly combined with many other libraries. OkHttp was written in Java and it is still a trendy network library in the Android tech stack, so you can use it confidently on your projects. Here is an example of how to make a synchronous network call with OkHttp:
private val client = OkHttpClient()
fun run() {
val request = Request.Builder()
.url("https://publicobject.com/helloworld.txt")
.build()
client.newCall(request).execute().use { response ->
if (!response.isSuccessful) throw IOException("Unexpected code $response")
for ((name, value) in response.headers) {
println("$name: $value")
}
println(response.body!!.string())
}
}
How to choose the right tech stack?
When choosing the right app stack for Android development, it is important to analyze both your software requirements and available resources. In this section, we suggest several aspects you can consider.
What are your product requirements?
If your Android application is expected to have high performance and greater customization, remember that native development with Java and Kotlin can ensure that. But if you put more emphasis on multiple platform reach, robust UI, and shorter timelines, go for cross-platform choosing Dart and Flutter.
What are your business goals?
If you are working on an MVP or want to deliver your product to as many users as possible and as quickly as possible, cross-platform is your best way. But if you’re not in a rush and willing to focus on a perfect user experience with long-term involvement, better choose a native tech stack.
What are your team’s capabilities?
Software developers specializing in native technology used in Android development are more skilled and well-informed in the technical intricacies of the platform. However, you will need to hire a separate specialist for iOS development, thus increasing your costs. Meanwhile, with cross-platform development, you will do with just one expertise profile and save money, but might lack some platform-specific know-how.
How are local data storages implemented in Android apps, including encrypted shared preferences and the Room database?
Local data storage is needed to securely store certain data when the device is offline. We can store data locally using various mechanisms, depending on the data size we need to store and the data persistence (how long we want to store it), as well as the app’s security requirements. For example, to store small amounts of simple data (key-value data like user settings), we use Encrypted SharedPreferences or DataStore, while for larger amounts of structured data, we will need a database like Room. Let’s consider these two options from the Android tech stack for local storage in more detail.
Encrypted Shared Preferences
Encrypted SharedPreferences storage can be used if you want to store a manageable amount of data. Android has two types of shared preferences:
- Shared preferences;
- Encrypted SharedPreferences.
What is the difference? Shared preferences store data in the following form:
<?xml version=’1.0’ encoding=’utf-8’standalone=’yes’ ?>
<map>
<string name=”SOME_STRING”>string</string>
<map>
It’s not secure; you can easily see all data stored in shared preferences. This is how it will look if you store the same data in Encrypted Shared Preferences:
<?xml version=’1.0’ encoding=’utf-8’ standalone=’yes’ ?><map>
<string name="AVz2qCVxm1KudCCJKYuxuoaAXoPeWKjG0w==">ASnO9uni11t3m9sNgDJbiYllL/tE+i99TYKfQ0h8XV6AUN0O3rBxBsMmcpw2DCY</string>
As you can see, one can’t easily access the true name and value of this data field. It can be advantageous if your application processes and stores sensitive data.
Note: the best practice in data-sensitive applications is not to store sensitive information locally.
Room database
To store a large amount of data, we recommend using a database, specifically Room. The Room database provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite.
The room can be used with Kotlin Coroutines, RxJava2/3, Guava, and Paging 3 library. The Room is essential if you want your application to work in offline mode or to reduce network calls using data locally cached in the database. The main advantage of the Room database is that it is easier to use and configure than the SQLite database. To use RoomDB you should do the following:
1) Create an entity data class;
2) Define data access object (DAO) for manipulating data in the database;
3) Define the database and describe DAO for it.
The usage-ready RoomDB:
- retrieve database object -> val db = Room.databaseBuilder(applicationContext, YourDatabaseClassName::class.java, “Database name”);
- retreive database DAO -> val userDao = db.userDao();
- get all users from the database -> val userList = userDao.getAllUsers().
As to the SQLite creation, configuration, and usage, you can refer to the SQLite configuration tutorials, however, to make things easier, we recommend sticking to RoomDB.
What are the key takeaways from this guide?
As you can see, the Android app development stack is getting more advanced year by year, becoming broader and more modernized, with some tools remaining unchanged in terms of use, like OkHttp or Retrofit 2.
What do Axon software developers recommend?
- Choose native mobile development technologies like Java and Kotli to deliver better UX and performance and go cross-platform with Flutter and Dart for development efficiency with multiple applications at a time.
- UI development is shifting towards a declarative paradigm, so Jetpack Compose becomes more widely used.
- At the same time, stay careful with new libraries. Take your time using them in your large projects. If you want to try using a new Android development technology, integrate it gradually in a test environment. For example, do not simultaneously rewrite all application screens to Android Jetpack Compose. Take one screen and do it in the test environment. It will be safer for project integrity.
- For dependency injection, Koin is more efficient in terms of build time while Dagger Hilt offers better runtime performance.
- You can trust old but well-established libraries that work well, especially in such business-critical aspects as networking and security.
- The choice of local data storage technology depends on the amount and structure of data to be stored.
Finally, mobile Android application development is a broad field of expertise and this article cannot account for every use case. On the other hand, our engineering experts will be glad to hear about your project concept or evaluate an existing application to provide a technology consultation and guide you along your solution development path step by step.
FAQ
Android tech stack is a collection of technologies used for the development of applications that can run on the Android platform. These technologies include an integrated development environment (IDE), programming languages, frameworks, libraries, UI tools, communication protocols, and other developer instruments needed to build and deploy an Android application.
The most commonly used tools for Android app development are the following: - Programming languages: Kotlin, Java, Dart (in Flutter for cross-platform) - IDEs and code editors: Android Studio, IntelliJ IDEA - UI/UX Design: Jetpack Compose, XML Layout Editor (if using XML files), Material Design - Backend and Database: Firebase, Node.js with Express, Room - Cross-platform: Flutter, React Native, Xamarin, Kotlin Multiplatform - QA tools: Android profiler, Android Debug Bridge (ADB), Espresso, and UI Automator
Both Java and Kotlin are the programming languages used for native Android application development. Kotlin is known as a more modern technology and is recommended for new Android development projects for being more concise, safer, easier to master and widely supported by other technologies. Java has been around for a long time and now is more often used to maintain existing and legacy Android applications. Also, Java is used for back-end development, which means it might be a better option for Android apps with complex back end or that are a part of enterprise systems. All in all, every Android project is unique and it is always a good idea to get professional project analysis and design before choosing specific technologies and getting down to implementation. Address software engineering specialists at Axon for competent advice.