Android注释和休息

AndroidAnnotations and Rest

我尝试遵循 AndroidAnnotations REST Documentation

但是我收到有关未找到 MappingJackson2HttpMessageConverter 的错误。

为了设置 AndroidAnnotations,我遵循了 Gradle Setup... 这工作正常,一个小项目正在工作。

但是,一旦我尝试使用 MappingJackson2HttpMessageConverter,它就会停止工作。

这是我的 Gradle 依赖项:

dependencies {
    apt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"

    compile "org.androidannotations:ormlite-api:$AAVersion"
    apt "org.androidannotations:ormlite:$AAVersion"

    compile "org.androidannotations:rest-spring-api:$AAVersion"
    apt "org.androidannotations:rest-spring:$AAVersion"

    compile 'com.fasterxml.jackson.core:jackson-core:2.7.3'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'

}

我在这里缺少什么?

谢谢, 乌尔克曼

您还必须添加 Spring Android REST 模板依赖项:

dependencies {
    compile 'org.springframework.android:spring-android-rest-template:2.0.0.M4'
} repositories {
    maven {
        url 'https://repo.spring.io/libs-milestone'
    }
}