LearnAndroid Libraries You Should Use in Every Project


writes on August 7, 2014

A good developer knows to never reinvent the wheel (“unless you plan on learning more about wheels“). With its roots in Linux and the open source community, Android has a vibrant and strong ecosystem of open source libraries that developers can freely use in their own apps. While some are for very specific uses that you may never need, others are so helpful and, well, simply delightful that you should never start an app without them.

It may sound like a lot of work to use an open source library in a project, but with Android Studio, it’s easier than ever. Often it only takes one line of code in your app’s build.gradle file to include a library automatically. Gradle is the new build automation tool in Android Studio, and it will automatically download and include libraries if they are set up for it. It is so easy and popular that many libraries have this built in and include instructions on how to do it.


On to my favorite libraries! Let’s start with a test: which of these do you like better?

protected TextView mWelcomeLabel;
protected EditText mUsernameField;
protected EditText mPasswordField;
protected Button mSubmitButton;

protected void onCreate(Bundle savedInstanceState) {
  mWelcomeLabel = (TextView) findViewById(R.id.welcomeLabel);
  mUsernameField = (EditText) findViewById(R.id.usernameField);
  mPasswordField = (EditText) findViewById(R.id.passwordField);
  mSubmitButton = (Button) findViewById(R.id.submitButton);


@InjectView(R.id.welcomeLabel) protected TextView mWelcomeLabel;
@InjectView(R.id.usernameField) protected EditText mUsernameField;
@InjectView(R.id.passwordField) protected EditText mPasswordField;
@InjectView(R.id.submitButton) protected Button mSubmitButton;

protected void onCreate(Bundle savedInstanceState) {

The latter code is more concise and understandable, don’t you think? The second block of code is using a library called ButterKnife, which uses annotations to “inject” views by creating boilerplate code for you. ButterKnife is small, simple, and lightweight, and because it makes your life as a developer easier, you should pretty much always use it. It would be great if the Android SDK itself could improve in this manner!

There are additional attributes you can use to make OnClickListeners and other common, verbose aspects of Android development easier to write and understand.

Below is all you need to include this library automatically in your Android Studio projects. Just add this one line to your app’s build.gradle file (in app/src):

compile 'com.jakewharton:butterknife:5.1.2'

You need to add it in the dependencies section, like this:

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.jakewharton:butterknife:5.1.2'


You may not need this for every app, but if you are downloading images from the web, then you should use Picasso. There are a few popular libraries that do this kind of work, but Picasso is my favorite because it’s simple and easy and I really like how the API is written. Code should always be this intuitive and pleasurable to use!

If you have never downloaded an image from the web in Android, then perhaps you don’t know why this is so helpful. Here are the steps you need to take to download an image with only the standard Android APIs:

  1. Get Image URL
  2. Create AsyncTask to download image
  3. Execute AsyncTask
  4. Store result in Bitmap
  5. Set bitmap as source
  6. Cache image for future

That’s a lot of work! Doesn’t it seem like you should just be able to provide the URL to an ImageView and magically have it appear? Check out the steps if you use Picasso:

  1. Get image URL
  2. Load it into an ImageView with one line:

This last line says, “With this context, load this image URL into this ImageView.” Not only is it short and sweet, but it also takes care of those other steps mentioned above behind the scenes. It’s an asynchronous download and the image is automatically cached for future use. It also has additional features that make it helpful for debugging and other work.

Picasso Debugging

Once again, adding it to your project is super easy in Android Studio. Just add this line to your dependencies section (like ButterKnife above):

compile 'com.squareup.picasso:picasso:2.3.3'

If you want to see this in action, I cover using it in Build a Self-Destructing Message App and Implementing Designs for Android.

Downloading things other than images from the web? Check out android-async-http!


The Material Design guidelines focus heavily on animation, and if you use it correctly, you can really make your app look polished and make your interactions more intuitive and enjoyable. Animations can be hard, but good libraries make them easy!

For a set of regular View animations, check out AndroidViewAnimations. I’ll let the author’s animated GIF speak for itself:

Examples from AndroidViewAnimations

The syntax for this library is similar to what we saw for Picasso above:


Including it is simple, though it does require two other projects as well:

dependencies {
  compile 'com.nineoldandroids:library:2.4.0'
  compile 'com.daimajia.easing:library:1.0.0@aar'
  compile 'com.daimajia.androidanimations:library:1.0.8@aar'

Another really helpful animations library is ListViewAnimations, which makes animating items in a list very easy. Check out the demo video on Google Play to see examples of everything it can do.

How to Discover Libraries

If you are new to the open source community, you may be wondering how you can find libraries like this on your own. It’s really just a mindset. Every time you go to add new code, ask, “Has somebody done this already?”

  • Ask Google
  • Ask GitHub
  • Ask StackOverflow
  • Ask a friend

Then, once you find a library that looks interesting, remember the most important two letters for researching open source libraries: vs.

Whenever I’m researching a library, I google the library’s name followed by “vs”. Then in autocomplete I see competing libraries that the one I’m researching has been compared to. That helps me evaluate similar libraries and choose the best one for me. Check out this example of ButterKnife:

"ButterKnife vs" Google search

RoboGuice, AndroidAnnotations, and Dagger are all libraries that do similar injection things like we saw ButterKnife does for us.

Lastly, you can utilize social media and newsletters to keep an eye on the open source landscape. I passively monitor the following and bookmark any libraries that look useful.

Remember, one of the main goals of programming is to be efficient and complete. Learning how to use the work of others to augment your own is a valuable skill even the most seasoned professionals rely on.

*Library image courtesy of timetrax23 under the Creative Commons license.


Learning with Treehouse for only 30 minutes a day can teach you the skills needed to land the job that you've been dreaming about.

Get Started

20 Responses to “Android Libraries You Should Use in Every Project”

  1. Hello!Butter knife is also my favorite 🙂 and Is there any library I can use to for these purposes: comments, rates ,likes and share?

  2. Hi Ben! i just loved your article! i am a newbie with all this (I’ve started to learn Android on my own, last friday) so i have a silly question… my app is telling me I have an error on “Yoyo” and “Techniques” (it can’t resolve them) why is that? i cant figure it out, I added the 3 dependencies to the module and then sync Gradle, do i have to “import” something? Thank you so so much and sorry for my english.
    Guada from Argentina 🙂

  3. Hey There. I discovered your blog the usage of msn. That is an extremely well written article. I will make sure to bookmark it and return to read more of your helpful info. Thanks for the post. I’ll certainly comeback.

  4. Very Interesting article and quite valuable. thanks for sharing 🙂

  5. リミテッドエディション,トゥッティフルッティ,トゥールビヨンソロバットバン,ウブロ ビッグバン トゥールビヨン ソロ バットバン 28800振動 (手巻き),ウブロ ビッグバン トゥールビヨン ソロ バットバン 28800振動 (手巻き), BOX, ビッグバンブラックマジック衝撃のクオーツ式腕時計の開発|エプソン水晶デバイス世界初のクオーツ式腕時計である「クオーツアストロン 35Q」。当時、高精度と小型化の開発競争を制したのが、諏訪湖のほとりに社屋を構えていた諏訪精工舎(現在のセイコーエプソン)である
    日本最高級スーパーコピーブランド時計激安通販専門店,高品質時計コピー,2015最新作、国際ブランド腕時計コピー、業界唯一無二.世界一流の高品質ブランドコピー時計,当店はスーパーコピー時計専門店,販売以下世界一流ブランドコピー時計:ロレックスコピー、ウブロコピー、オメガコピー、シャネルコピー…ンプルに見えて目を奪われてしまう独創的なブルガリのラインアップです。1884年ブルガリの創始者ソティリオ?ブルガリが銀細工師の一族としてイタリ アにオープン。ブルガリ?ブルガリシリーズ。古代ローマの円形競技場をモチーフにした時計「アンフィテアトロ」、若い世代向けの腕時計「ソロテンポ」を発 表。2000年には新会社ダニエル?ロード&ジェラルド?ジェンダ オート?オルロジュリー社を設立しました。本物ブランド時計に間違える程のスーパーコピー時計通販!スーパーコピーは業界n級品最高品質に挑戦!ロレックスコピー,パネライコピー,ウブロコピー,オメガコピー,ルイ?ヴィトンコピー,エルメスコピーを初め世界中有名なスーパーコピーブランドを激安で通販しております!HERMES(バッグ、時計) CHANEL(バッグ、時計)LOUIS VUITTON(バッグ、時計) BVLGARI時計Christian Dior(バッグ、小物) COACH(バッグ)GUCCI(バッグ、小物) ROLEX(時計)OMEGA(時計) IWC(時計) http://www.newkakaku.com/lb5.htm

  6. スーパーコピー時計専売店当店は海外安心と信頼のスーパーコピーブライトリング、代引き店です.正規品と同等品質のシャネル コピー代引き,品質が秀逸,値段が激安!ブライトリングコピー,代引きなどの商品や情報が満載!全商品写真は100%実物撮影です! お客様の満足度は業界No.1です!スーパーコピー時計,時計コピー ,ブランド時計コピー販売(n級品)店舗 ブランド腕時計(ロレックス,ブライトリング,タグホイヤー,オメガ,ガガミラノなど)の最新 情報やイベントを紹介する正規販売店と腕時計コピーの専門サイトです。当店はロレックスやパテックフィリップなどの新品スーパーコピー時計の販売と。
    エルメス ボリードスーパーコピー.ブランド直営店.ブランド,エルメス激安通販,業界で最高な品質に挑戦します!”ブランドN級品ブランドコピー 代引き,スーパーコピー時計,ブランドN級品,楽天コピーブランド,,偽物ブラン日本最大級の最高のスーパーコピーブランド財布激安代引き販売店,スーパーコピー時計の激安老舗.!国内No.1時計コピー工房,アフターサービスも自ら製造したスーパーコピー時計なので、技術力でお客様に安心のサポー トをご提供させて頂きます。スーパーコピー 代引きN品をご 購入の方は、こちらへ.弊社は正規品と同等品質のコピー品を低価で お客様に提供します!すべての商品は品質2年無料保証です。100%実物写真ですし、品質が完璧です!”スーパーコピーブランド財布激安 偽物財布激安コピー ルイヴィトン財布偽物,偽物財布コピー http://www.msnbrand.com/brand-copy-IP-12.html

  7. ブランドスーパーコピーバッグ、財布、時計プラダ スーパーコピー,プラダ 財布 コピー,プラダ 新作 財布ブランド財布コピー,ブランド スーパーコピー 財布,プラダ スーパーコピー 財布,シャネル財布コピールイヴィトン 財布 コピー,ルイヴィトン 財布 コピー 代引き,ルイヴィトン財布スーパーコピー,ルイヴィトン 財布 スーパーコピー 代引き,ヴィトン財布代引き,ヴィトン財布 人気,ヴィトン財布 激安,モノグラム 財布,マルチカラー 財布,ルイヴィトン財布新作,ルイヴィトン バッグ 新作,ルイヴィトン スーパーコピー 即日発送ルイヴィトン スーパーコピー 専門店ルイヴィトン スーパーコピー バッグルイヴィトン スーパーコピー 財布ルイヴィトン スーパーコピー 長財布2015年新作 ルイヴィトン スーパーコピールイヴィトン コピー,ルイヴィトン コピー 財布,ルイヴィトン コピー バッグ
    財布コピー、バッグコピー、腕時計コピー、ベルトコピー靴コピーネックレスコピー、手帳コピー、小物コピー、SS品、N品、価格激安、品質の保証,2015人気ブランド偽物,歓迎光臨楽天★送料無料(日本全国)典雅気質!シャネルバッグCHH67723(*^^*)11月シャネル手作り新作(*^^*)時流の先端快適美品!シャネルブーツCH783283四季向け「 シャネル靴」最高な選択!ブランドコピー 代引きコピーブランド 代引きスーパーコピー 代引きスーパーコピーブランドバッグルイヴィトン コピーシャネル コピー http://www.ooowatch.com/tokei/chanel/index.html

  8. NasimBahar on October 10, 2015 at 11:42 pm said:

    Nice Article . keep it up.

  9. Shivakumar on October 7, 2015 at 11:46 am said:

    Excellent tutorial, even I always follow “vs” trick in Google search to get information about other similar libraries, Have you used EventBus library, it is also one of the best library I used in Android application development.

  10. Edge Silva on September 30, 2015 at 1:01 am said:

    Hello Ben, your article is amazing. I would like know about shared files between android and IOS, do you have suggestion?

    Have a nice day.

  11. You got a nice selection there. I use all of them, but I think you forgot to mention one of the best for making REST API calls. Retrofit. I think it’s a necessary library for every android developer since it makes HTTP Requests easy through annonations, and also JSON parsing by using POJO classes, and some tweaks in the code.

    • Totally! I should have listed OkHttp here as well (which RetroFit utilizes under the hood). The article was getting long when I wrote it, but looking back I wish I would have at least mentioned and linked to OkHttp and RetroFit.

      • sivaprasad on December 15, 2015 at 4:03 am said:

        This is very useful for me , Great article. I think you forgot Event Bus Library , which will provides very easy communication to send data between android components like activity , services.. etc.

  12. Abdelah SELASSI on August 18, 2014 at 12:37 pm said:

    Android Arsenal : android-arsenal.com/free

  13. This is very useful for me. Great article! Thanks for the recommended websites; will be watching them from now on. Libraries are SUCH a time saver.

  14. I am a complete novice when it comes to apps development,and I have this great Iidea that will generate great traffic like face book.
    I need some one to work and who will guide me on developing,lunch and profit from the app

  15. Michael Glen on August 9, 2014 at 1:36 pm said:

    Very interesting article. I didn’t realize that so many nice libraries exist for Android. Personally I use Pertusin which takes care of forms communications and db storage. But I bet nobody ever heard of it. It is general problem, without knowing library name it is impossible to get info of it.

    • Thanks! I haven’t heard of Pertusin; I’ll have to check it out. As you mentioned, it’s so hard to even know what is available. But it’s easier than ever to find things, so I ask myself all the time while coding, “Has somebody done this already? Is there a library for it?”

Leave a Reply

You must be logged in to post a comment.

man working on his laptop

Are you ready to start learning?

Learning with Treehouse for only 30 minutes a day can teach you the skills needed to land the job that you've been dreaming about.

Start a Free Trial
woman working on her laptop