将AndroidAnnotations Maven设置调整为Gradle

是否可以将 AndroidAnnotations Maven设置调整为Gradle?
http://code.google.com/p/androidannotations/wiki/MavenEclipse
我似乎无法使它工作我继续得到com.sun.codemodel#codemodel; 2.5-FROZEN-AA:未找到

到目前为止,我有这个

description = "App"
abbreviation = "App"
version = '1.0.0.BUILD-SNAPSHOT'

buildscript {
    repositories {
        mavenRepo name: 'gradle-android-plugin',urls: 'http://jvoegele.com/maven2/'
        mavenRepo name: 'androidannotations',urls: 'http://repository.excilys.com/content/repositories/releases/'
    }

    def gradleAndroidpluginVersion = '1.0.0'

    dependencies {
        classpath "com.jvoegele.gradle.plugins:android-plugin:$gradleAndroidpluginVersion"
    }
}

apply plugin: 'android'
apply plugin: 'eclipse'
apply plugin: 'idea'

def compatibilityVersion = 1.6
sourceCompatability = compatibilityVersion
targetCompatibility = compatibilityVersion

repositories {
    mavenCentral()
    mavenRepo urls: 'http://maven.springframework.org/snapshot'
    mavenRepo urls: 'http://maven.springframework.org/milestone'
}

def roboguiceVersion = '1.1.1'
def guiceVersion = '2.0-no_aop'
def springAndroidVersion = '1.0.0.M4'
def commonsHttpClientVersion = '3.1'
def jacksonMapperVersion = '1.8.5'
def androidAnnotationsversion = '2.1'

dependencies {
    compile "org.roboguice:roboguice:$roboguiceVersion"
    compile "com.google.inject:guice:$guiceVersion"
    compile "org.springframework.android:spring-android-rest-template:$springAndroidVersion"
    compile "commons-httpclient:commons-httpclient:$commonsHttpClientVersion"
    compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonMapperVersion"
    compile "com.googlecode.androidannotations:androidannotations:$androidAnnotationsversion"
    compile group: 'com.googlecode.androidannotations',name: 'androidannotations',version: '2.1',classifier: 'api'
    runtime files('lib/server-standalone.jar')
}

sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
}

clean {
    delete 'gen'
}

idea {
    module {
        downloadJavadoc = true
    }
    project {
        javaVersion = 'Android 2.2 Platform'
    }
}

androidProcessResources.dependsOn(clean)
eclipse.dependsOn(cleanEclipse)
idea.dependsOn(cleanIdea)

defaultTasks 'assemble'

解决方法

作为第一个指针,我无法看到托管androidannotations lib的maven存储库的声明.

你应该添加http://repository.excilys.com/content/repositories/releases作为maven回购:

...
repositories {
    mavenCentral()
    mavenRepo urls: 'http://maven.springframework.org/snapshot'
    mavenRepo urls: 'http://maven.springframework.org/milestone'
    mavenRepo urls: 'http://repository.excilys.com/content/repositories/releases'
}
...

问候

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...