Is there an easier way to add gson to my project?
In app/build.gradle:
dependencies {
compile 'com.google.code.gson:gson:2.8.2'
}
If you are using Android Studio you can use the following workflow instead of manually changing Gradle files:
- File -> Project Structure -> Modules -> app -> Dependencies Tab
- Click '+' in the bottom left corner and select "Library dependency"
- In the search field type: "gson" and click Search
- Select "com.google.code.gson:gson:2.8.5"