Top 10 Essential Android Developer Libraries February 2020

It’s that time of the year when we round up the 10 best and most used Android developer libraries of the season.

The libraries listed down here have become set in stone as must-learns if you want to be a competent Android developer. Many companies will hands down require you to know many of these.

With that in mind, if you’ve spent any time Android developing at all, you’ll probably have already heard most if not all of these.

Without further ado, let’s get started with the list.


10. Android KTX

val combinedArraySet = arraySetOf(1, 2, 3) + arraySetOf(4, 5, 6)

val user: LiveData<User> = liveData {
    val data = database.loadUser() // loadUser is a suspend function.

Android KTX further extends the high levels of conciseness and beauty provided by the Kotlin programming language which is now not even arguably, the main language of Android.

This library provides a wide range of utility functions to shorten the syntax required in everyday development code including Collections, Fragments, and LiveData. It even ‘shortens’ syntax for other libraries in this list as well, those being Room, RxJava, and Firebase.


9. Timber


Timber is the ultimate logging tool that makes debugging a whole lot easier.

It provides a way to make logs without the need to manually add a log tag. Each log will figure out what class it’s being called from and use that as the log tag.

Each log belongs to a tree and no tree is installed by default because in the words of Jake Wharton: every time you log in production, a puppy dies.


8. RxJava

fun observeUsers(): Disposable {

    return observeConfiguration()
            .flatMap { apiService.observeUsers() }

Undoubtedly one of the most widely used reactive streams in Android, this library is crucial to add to your toolbelt if you want to be a competent Android developer.

It offers the ability to use observable streams to deliver async functions with insane levels of data manipulation and control through the use of thread-switching and transformation functions.

The only reason it’s so far-down in the list is that it’s no longer the ironclad ruler in what it does. Coroutines and LiveData now provide a much more lightweight and easier-to-learn way of writing asynchronous code.

But despite even that, the sheer number of operators and observable types make RxJava superior in many situations, earning it its spot in the list.



7. Firebase

Firebase is a set of tools to offer you almost everything you need from the cloud. This goes from typical cloud structures like a Realtime Database, Storage, Authentication, Crashlytics, and Remote Configuration, to more marketing related tools like Analytics, A/B Testing, and Cloud Messaging.

It also includes some pretty gimmicky tools like User Predictions, ML Kit, and Cloud Functions which can be extremely powerful in the right hands.

This is an indie developer’s dream as most of these tools are free until a certain timely quota for each of these services is reached (e.g. 50k database reads/day). Even after that, Firebase provides pricing plans which are pretty flexible to your use case.



6. Fresco

    fresco:placeholderImage="@drawable/my_drawable" />

Glide is an amazing image loading library, but Fresco takes the win here due to how easy it is to use.

You use a special Fresco SimpleDraweeView in place of an ImageView in your xml. Here, you set a placeholder image to display while your image is loading.

In your code, you simply have to call setImageUri and Fresco does the downloading, displaying, caching, and memory clearing of the image for you.

Fresco also provides other related features such as progress bar, resizing, and even images in notifications.


5. Room

interface UserDao {
    @Query("SELECT * FROM user")
    fun getAll(): List<User>

    fun insertAll(vararg users: User)

    fun delete(user: User)

Room is an abstraction layer over SQLite which allows you to perform database queries in a similar fashion to Retrofit, using an annotation-based interface class and standard SQL syntax.

Room is also an ORM (Object Relational Mapping) library, thus handles the mapping of database objects to Java objects, allowing you to avoid the great amounts of boilerplate needed for mapping when using standard SQLite.

On top of this, Room also works with LiveData and RxJava observables.


4. Moshi

class CardAdapter {
  @ToJson String toJson(Card card) {
    return card.rank +, 1);

  @FromJson Card fromJson(String card) {
    if (card.length() != 2) throw new JsonDataException("Unknown card: " + card);

    char rank = card.charAt(0);
    switch (card.charAt(1)) {
      case 'C': return new Card(rank, Suit.CLUBS);
      case 'D': return new Card(rank, Suit.DIAMONDS);
      case 'H': return new Card(rank, Suit.HEARTS);
      case 'S': return new Card(rank, Suit.SPADES);
      default: throw new JsonDataException("unknown suit: " + card);

Moshi the definitive JSON adapter of 2020. It has plenty of advantages over Gson and Jakson.

You have qualifiers like @HexColor int for multiple JSON representations for a single Java type, predictable exceptions with IOException and JsonDataException (Gson’s exceptions are all over the place), and JsonAdapter.failOrUnknown() to reject unexpected JSON data, just to name a few.

Custom type adapters are also much easier to write with Moshi with their @ToJson and @FromJson annotations.

You get all this in a library that is smaller than JSON and less prone to leaking.

These details were sourced from this Reddit page.


3. Every Major Testing Library

fun `When cart total is over fifty return free delivery method`() {
    val mockCartManager = mock(


    val actualDeliveryMethod = DeliveryManager.getDeliveryMethod(mockCartManager)
    val expectedDeliveryMethod = "free_delivery"

    assertEquals(expectedDeliveryMethod, actualDeliveryMethod)

The testing scene in Android is already very well defined by 4 libraries: JUnit, Espresso, Mockito, and Robolectric.

JUnit and Espresso are included in every Android by default and are responsible for running unit tests and UI tests respectively. Mockito is used for mocking and spying classes during unit tests, and Robolectric lets you access Android SDK components in unit tests for a more instrumented type of test.

While each developer/team may have slight variations in their test setups, such as using PowerMock, or whether they approve of Robolectric or not, you can’t deny these 4 are crucial to the testing scene and won’t be going anywhere anytime soon.


2. Dagger

@Module(includes = [LoginModule.LoginAbstractModule::class])
class LoginModule {

    internal fun provideResourceProvider(context: LoginActivity): BaseResourceProvider {
        return ResourceProvider(context)

    interface LoginAbstractModule {
        fun loginFragment(): LoginFragment

Dependency injection is crucial for keeping your classes loosely coupled and easily testable. Dagger is one of the prime libraries in Android for such things, the other one being Koin.

The Dagger vs Koin war is an ongoing one, but despite the many controversies about Dagger, it’s multiple versions, and official-deprecation of dagger-android, Dagger still takes the lead when it comes to dependency injection, due to how easy it is to fall into bad practices with Koin.

Dagger does have a steep learning curve, and is quite complex. It doesn’t help that its documentation is very lackluster and that pretty much every single developer has a different way of implementing it.

Despite those shortcomings, Dagger in the right hands has the power to change the way a developer writes entire apps… literally.

And no matter how well you can argue that Koin is better than Dagger, if you don’t know how to use Dagger, you are by definition, an incompetent Android developer.

And yes, I do mean Dagger 2.


1. Retrofit

public interface GitHubService {
  Call<List<Repo>> listRepos(@Path("user") String user);

Retrofit turns your HTTP API calls into an interface. You use annotated methods to make your api calls in-app.

Retrofit does this one simple yet crucial job and does it extremely well. You have a wide array of annotations to use such as @Path, @Body, @QueryMap, and @Url to build your api calls.

When you build your Retrofit object, you can define your Base Url and add call adapters and converter factories as you see fit. It’s also easy to build for testing.

Its sheer simplicity, great documentation, testability, and usefulness earn it a very well deserved number one spot on this list, as well as a must for every Android developer to have in their toolbelts.

Almost every single app making any sort of API calls will be using this library. Jobs will require it. You will need to know it. That’s simply how amazing it is.



Subscribe to the Newsletter