Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Spring for android dependency to gradle + Android studio project

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.

like image 822
sat Avatar asked Aug 12 '14 22:08

sat


People also ask

How do you add spring dependencies in build Gradle?

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.

How do you add a dependency in Gradle?

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.

Can you use Spring in Android Studio?

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.


1 Answers

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'
}
like image 110
Roy Clarkson Avatar answered Oct 25 '22 11:10

Roy Clarkson