Retrofit— A simple Android tutorial

Prakash Pun
3 min readDec 24, 2017

For this tutorial, we are going to see how to use Retrofit HTTP client in your Android application.

Retrofit is an awesome type-safe HTTP client for Android and Java built by awesome folks at Square. Retrofit makes it easy to consume JSON or XML data which is parsed into Plain Old Java Objects (POJOs).

If you just want to get the sample project, then you can find it here.

So, without any further delays, lets get started by first creating a new project in Android Studio.

  1. Go to File ⇒ New Project. When it prompts you to select the default activity, select Empty Activity and proceed.
  2. Open build.gradle in (Module:app) and add Retrofit, Picasso, RecyclerView, Gson dependencies like this.

--

--

Prakash Pun

Passionate developer sharing insights, tips, and the latest trends. Turning code into creativity. 💻✨ My newsletter : https://codeandpixels.beehiiv.com/