How to add Spring RestTemplate to Android Studio

Default featured post

As mentioned in a previous post related to Android, Android Studio has lack of documentation for novice users. For instance, one of the lacking area is how to add dependencies to Android Studio projects. Default dependency/build manager in Android Studio is Gradle which personally I am not a big fan, I prefer Maven over it.
Like adding any other dependencies you can add Spring RestTemplate to your android project to be able to easily consume any Rest API. In order to do so open your Android Studio and look for a file to open named build.gradle. After you open the file scroll to the bottom of it and add this line under dependencies block.

compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'

Afterwards, need to refresh your project to see the effects. For better understanding of what mentioned have a look at this picture.

You can also add other useful stuff from Spring to your Android Studio project such as Spring Twitter, Spring Facebook, etc.

Further reading,

2 thoughts on “How to add Spring RestTemplate to Android Studio

Comments are closed.