Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Android Add Library Dependency

Miroslav Smukov edited this page Jul 17, 2016 · 1 revision

Add Library Dependency

For a new Discover Users page that I was developing, I needed to use Gson. Gson is a Java serialization/deserialization library that can convert Java Objects into JSON and back. Gson isn't available in your Android project by default, and you need to add it as library dependency. Let's see how do that.

First, in Android Studio, click on File > Project Structure...:

Adding Library Dependency 1

Next, click on Dependencies tab in a Project Structure window that opened. And then click on the green + (plus) icon and select 1. Library Dependency:

Adding Library Dependency 2

Now in the Choose Library Dependency window start typing the name of the library that you want to add - in my case this was "gson". Select the desired library among the offered choices and click OK.

Adding Library Dependency 3

That's it. The library will now be usable within your Android project.

Clone this wiki locally