뉴질랜드 다이어리(NZ Diary) 라빠

[Android] Must Have Libraries 본문

개발

[Android] Must Have Libraries

Donochi 2016. 11. 8. 11:15


안드로이드 앱을 개발하면서 모든 기능을 직접 구현하는 개발자는 없을것이고,

이는 곧 다양한 라이브러리들을 활용하여 기능을 빠른 시간에 구현하는것이 당연한 일이라는 소리..

하지만, 어떤 라이브러리가 있으며, 또한 같은 기능을 제공하는 다양한 라이브러리중에서 어떤 라이브러리를 사용할지를 아는것도 노하우.


한 GitHub 유저가 정리해 놓은 Must Have Libraries 를 통해서 주로 사용되고, 성능이 검증된 다양한 라이브러리를 알아보자.




Must Have Libraries

Nathan Esquenazi edited this page a day ago · 180 revisions

Finding these guides helpful?

We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.

Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.

Interested in ramping up on Android quickly?

(US Only) If you are an existing engineer with 2+ years of professional experience in software development and are serious about ramping up on Android quickly, be sure to apply for our free evening 8-week Android bootcamp.

We've trained over a thousand engineers from top companies including Apple, Twitter, Airbnb, Uber, and many others leveraging this program. The course is taught by Android experts from the industry and is specifically designed for existing engineers.

Not in the United States? Please fill out our application of interest form and we’ll notify you as classes become available in your area powered by local organizers.

Clone this wiki locally
 Clone in Desktop

Overview

There are many third-party libraries for Android but several of them are "must have" libraries that are extremely popular and are often used in almost any Android project. Each has different purposes but all of them make life as a developer much more pleasant. The major libraries are listed below in a few categories.

Standard Pack

This "standard pack" listed below are libraries that are quite popular, widely applicable and should probably be setup within most Android apps:

NameDescription
RetrofitA type-safe REST client for Android which intelligently maps an API into a client interface using annotations.
GlideA powerful image downloading and caching library for Android.
ButterKnifeUsing Java annotations, makes Android development better by simplifying common tasks.
ParcelerAndroid Parcelable made easy through code generation
IcePickAndroid Instance State made easy
LeakCanaryCatch memory leaks in your apps
EspressoPowerful DSL for Android integration testing
RobolectricEfficient unit testing for Android

Advanced Pack

The "advanced pack" listed below are additional libraries that are more advanced to use but are popular amongst some of the best Android teams. Note that these libraries may not be suitable for your first app. These advanced libraries include:

NameDescription
Dagger 2A fast dependency injector for managing objects.
RxJavaDevelop fully reactive components for Android.
EventBusAndroid event bus for easier component communication.
AndroidAnnotationsPowerful annotations to reduce boilerplate code.
RetrolambdaBringing lambda block support to Android.

Keep in mind that the combination of these libraries may not always play nicely with each other. The following section highlights some of these issues.

Parceler and IcePick

Note that you cannot use IcePick at the current time to save state of Parceler objects. See this GitHub issue for more context on why they are incompatible. You will need to use explicitly Parcelable objects with IcePick. You may consider replacing Parceler with AutoParcel which works seamlessly with IcePick.

ButterKnife and Parceler

Using the Butterknife library with the Parceler library causes multiple declarations of javax.annotation.processing.Processor. In this case, you have to exclude this conflict in your app/build.gradle file:

   packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'  // butterknife
    }

ButterKnife and Custom Views

Often you may find that using ButterKnife or Dagger injections defined in your constructor prevent Android Studio to preview your Custom View layout. You may see an error about needing isEditMode() defined. Essentially this method is used to enable your code to short-circuit before executing a section of code that might be used for run-time but cannot be executed within the preview window.

  public ContentEditorView(Context context, AttributeSet attrs) {
        super(context, attrs);

        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        inflater.inflate(R.layout.view_custom, this, true);

        // short circuit here inside the layout editor
        if(isInEditMode()) {
            return;
        }

        ButterKnife.bind(this);

Convenience

  • Dagger - A fast dependency injector for Android and Java. See this video intro from Square.
  • Spork - Spork is an annotation processing library to speed up development on your projects. It allows you to write less boilerplate code to make your code more readable and maintainable.
  • AutoParcel - Port of Google AutoValue for Android with Parcelable generation goodies.
  • Hugo - Easier logging within your app
  • Logger - Much cleaner and easier logcat trace messages
  • LeakCanary - Easily catch memory leaks as they occur
  • AndroidAnnotations - Framework that speeds up Android development. It takes care of the plumbing, and lets you concentrate on what's really important. By simplifying your code, it facilitates its maintenance
  • Calligraphy - Custom fonts made easy
  • EasyFonts - Easy preloaded custom fonts in your app
  • AndroidViewAnimations - Common property animations made easy
  • AboutLibraries - Automatically generates an About this app section, with a list of used libraries
  • SDK Manager Plugin - Helpful plugin especially for group projects if you're missing an SDK version, haven't downloaded an API version, or your support library is updated.
  • EasyDeviceInfo - Get device information in a super easy way

Extensions

Networking

  • Retrofit - A type-safe REST client for Android and Java which intelligently maps an API into a client interface using annotations.
  • Picasso - A powerful image downloading and caching library for Android.
  • Ion - Powerful asynchronous networking library. Download as a jar here.
  • Android Async HTTP - Asynchronous networking client for loading remote content such as JSON.
  • Volley - Google's HTTP library that makes networking for Android apps easier and most importantly, faster.
  • OkHttp - Square's underlying networking library with support for asynchronous requests.
  • Glide - Picasso image loading alternative endorsed by Google
  • Android Universal Image Loader - Popular alternative for image loading that can replace Picasso or Glide.
  • Fresco - An image management library from Facebook.
  • Fast Android Networking -Fast Android Networking is a powerful library for doing any type of networking in Android applications which is made on top of OkHttp Networking Layer.

ListView

RecyclerView

  • UltimateRecyclerView - Augmented RecyclerView with refreshing, loading more, animation and many other features.
  • AdvRecyclerView - Extended RecyclerView with swipe to dismiss, and draggable or expanding items.
  • android-parallax-recyclerview - An adapter which could be used to achieve a parallax effect on RecyclerView.
  • sticky-headers-recyclerview - Sticky Headers decorator for Android's RecyclerView.
  • FastAdapter - Simplify and speed up the process of filling your RecyclerView with data
  • ItemAnimators - RecyclerView animators to animate item add/remove/add/move
  • GreedoLayout - Full aspect ratio grid LayoutManager for Android's RecyclerView
  • RecyclerViewHelper - Provides the most common functions around recycler view like Swipe to dismiss, Drag and Drop, Divider in the ui, events for when item selected and when not selected, on-click listener for items.
  • async-expandable-list - async-expandable-list provides solutions to displaying header-sub-items structure with simple api and asynchronously loading sub-list into an expandable list.

Easy Navigation

UI Components

Drawing

  • MPAndroidChart - A powerful Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.
  • HoloGraphLibrary - Newer graphing library
  • EazeGraph - Another newer library with potential
  • AndroidCharts - Easy to use charts
  • AndroidGraphView - library to create flexible and nice-looking diagrams.
  • AndroidPlot - plotting library for Android
  • WilliamChart - Flexible charting library with useful motion capabilities.
  • HelloCharts - Charts/graphs library for Android with support for scaling, scrolling and animations.
  • Leonids - Simple and easy particle effects (See Tutorial)
  • Confetti - Newer particle effects library.
  • AChartEngine - This is a charting software library for Android applications

Image Processing

Scanning

Persistence

  • ActiveAndroid
  • DBFlow - A robust, powerful, and very simple ORM android database library with annotation processing.
  • greenDAO
  • SugarORM
  • RxCache - Reactive caching library for Android
  • Android-Orma - A type-safe ORM for Android as a wrapper of SQLiteDatabase
  • ORMLite
  • SQLBrite - Lightweight wrapper around SQLiteOpenHelper
  • Cupboard - Popular take on SQL wrapper
  • StorIO - Fresh take on a light SQL wrapper
  • Realm
  • NexusData
  • Hawk - Persistent secure key/value store
  • Poetry - Persist JSON directly into SQLite
  • JDXA - The KISS ORM for Android - Simple, Non-intrusive, and Flexible

Binding

Compatibility

Scrolling and Parallax

This is a list of popular scrolling and parallax libraries:

Debugging

  • Stetho - A debug bridge for Android applications which could be used for multiple purposes not limited to Network Inspection, Database Inspection and Javascript Console.
  • Bugfender - Cloud storage for your app logs, track user behaviour to find problems in your mobile apps.

Resources

Check out the following resources for finding libraries:

References

출처 : https://github.com/codepath/android_guides/wiki/Must-Have-Libraries


상당히 많은 라이브러리가 포함되어 있고, 사용해본 것들, 그리고 사용해보지 않은것들...그리고 처음 들어보는것들도 있다.

설명을 잘 참고하여, 꼭 필요한 라이브러리를 잘 찾아보기.