Official Spring for Android page mentions to add following dependency code.
dependencies {
compile 'org.springframework.android:spring-android:1.0.1.RELEASE'
}
which is latest version of build as of this time.(as per website)
I have added it in apps' build.gradle but I get an error as
Error:Failed to find: org.springframework.android:spring-android:1.0.1.RELEASE
What is the right way to do it? I could add google play services as dependency in the same way.
We can add Spring Boot support into our Gradle project by applying the Spring Boot Gradle plugin. We can select the preferred Spring Boot version by setting the version of the Spring Boot Gradle plugin. This means that we don't have to set the dependency versions of the Spring Boot dependencies.
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.
Android Studio and the New Build System for Android offer a Gradle plugin for building Android apps. Gradle provides built in dependency management, which can be used to include the Spring for Android dependencies in your project.
Here is the correct dependency for the Rest Template module. I've corrected this on the Spring for Android project page. Thank you very much for pointing out this error.
dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
}
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