How do I add gson to my project with gradle? I only see people adding files to their projects. I don't want to download the project and put it in mine.
To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build.gradle file.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With