# Congratulations, you have a lot of code!"Congratulations, you have a lot of code!" Remedying Android's method limit - Part 1

DevFeed: [Congratulations, you have a lot of code!"Congratulations, you have a lot of code!" Remedying Android's method limit - Part 1](<https://devfeed.tech/articles/congratulations-you-have-a-lot-of-code-congratulations-you-have-a-lot-of-code-remedying-android-s-method-limit-part-1-2014.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//congratulations-you-have-a-lot-of-code-remedying-androids-method-limit-part-1>)

Published: 2015-09-21T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [building](<https://devfeed.tech/tags/building.md>), [code](<https://devfeed.tech/tags/code.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [developers](<https://devfeed.tech/tags/developers.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [features](<https://devfeed.tech/tags/features.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [platform](<https://devfeed.tech/tags/platform.md>), [release](<https://devfeed.tech/tags/release.md>)

## AI overview

This article explains how SoundCloud addressed Android's DEX method limit as its application grew to about 1,200 Java source files and 86,000 lines of code. It introduces the 65,536-method limit, discusses ways to stay below it, and previews Android MultiDex as an option for exceeding it.

## Source excerpt

At SoundCloud we have been building for the Android platform since 2010. Much has changed since then: the team has grown, the list of features has grown, and our audience has grown. Today, eight engineers are working full time on the official SoundCloud app, across various areas, with contributions pouring in from other parts of the organization. Due to the growing complexity and number of contributions, the app's size has grown substantially. Currently the app consists of approximately 1200 Java source files, not counting tests, containing approximately 86000 lines of code. This doesn't include native code, such as our playback or recording stacks. We're not the first to run into Android's limits in terms of build tools. An internal limitation of Dalvik's byte code format (DEX), which I will explain in more detail, can leave you unable to build after your codebase reaches a certain size. If you fail to anticipate this, it might happen during the most inconvenient time, such as when you are preparing for a release. Part of our job in Core Engineering at SoundCloud is to make sure our developers are happy and productive; not being able to build our app anymore makes for neither happy nor productive developers. While there are a number of posts on this topic, I would like to describe in more detail what we have done to combat Android's method limit, what things worked well and what didn't work so well, what it actually means to use the tool's switch and what you can do to improve application health with regards to size.