本文介绍了适应AndroidAnnotations Maven的设置,以摇篮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能AndroidAnnotations Maven的设置改编成摇篮?

我似乎无法使它工作,我不断收到的com.sun $ C $#cmodel codemodel 2.5冷冻-AA:未找到

到目前为止,我有这个

 说明=应用程序
缩写=应用程序
版本='1.0.0.BUILD-快照buildscript {
    库{
        mavenRepo名称:'gradle这个-Android的插件,网址:'http://jvoegele.com/maven2/
        mavenRepo名称:'androidannotations,网址:'http://repository.excilys.com/content/repositories/releases/
    }    高清gradleAndroidPluginVersion =1.0.0    依赖{
        类路径com.jvoegele.gradle.plugins:Android的插件:$ gradleAndroidPluginVersion
    }
}应用插件:'机器人'
应用插件:日蚀
应用插件:观念高清compatibilityVersion进行= 1.6
sourceCompatability = compatibilityVersion进行
targetCompatibility = compatibilityVersion进行库{
    mavenCentral()
    mavenRepo网址:'http://maven.springframework.org/snapshot
    mavenRepo网址:'http://maven.springframework.org/milestone
}高清roboguiceVersion =1.1.1
高清guiceVersion ='2.0 no_aop
高清springAndroidVersion ='1.0.0.M4
高清commonsHttpClientVersion ='3.1'
高清jacksonMapperVersion =1.8.5
高清androidAnnotationsVersion ='2.1'依赖{
    编译org.roboguice:roboguice:$ roboguiceVersion
    编译com.google.inject:吉斯:$ guiceVersion
    编译org.springframework.android:spring-android-rest-template:$springAndroidVersion
    编译公地的HttpClient:公地的HttpClient:$ commonsHttpClientVersion
    编译组织codehaus.jackson:杰克逊映射器-ASL:$ jacksonMapperVersion
    编译com.google code.androidannotations:androidannotations:$ androidAnnotationsVersion
    编译组:'com.google code.androidannotations',名称:'androidannotations',版本:2.1,分类:API
    运行时文件(LIB /服务器standalone.jar')
}sourceSets {
    主要{
        java的{
            SRCDIRSRC
        }
    }
}清洁{
    删除根
}想法{
    模块{
        downloadJavadoc =真
    }
    项目{
        javaVersion ='的Andr​​oid 2.2平台
    }
}androidProcessResources.dependsOn(清洁)
eclipse.dependsOn(cleanEclipse)
idea.dependsOn(cleanIdea)defaultTasks'组装'


解决方案

好吧,我设法解决这个问题。

我不得不添加

  {库
    mavenCentral()
    mavenRepo网址:'http://maven.springframework.org/snapshot
    mavenRepo网址:'http://maven.springframework.org/milestone
    mavenRepo网址:'http://repository.excilys.com/content/repositories/releases
    mavenRepo网址:'http://repository.excilys.com/content/repositories/thirdparty
}springAndroidVersion ='1.0.0.M4
commonsHttpClientVersion ='3.1'
jacksonVersion =1.8.5
androidAnnotationsVersion =2.1.1依赖{
    编译org.springframework.android:spring-android-rest-template:$springAndroidVersion
    编译公地的HttpClient:公地的HttpClient:$ commonsHttpClientVersion
    编译组织codehaus.jackson:杰克逊映射器-ASL:$ jacksonVersion
    编译com.google code.androidannotations:androidannotations:$ androidAnnotationsVersion
    编译com.google code.androidannotations:androidannotations:$ androidAnnotationsVersion:API
}

Is it possible to adapt AndroidAnnotations Maven setup into Gradle?http://code.google.com/p/androidannotations/wiki/MavenEclipseI can't seem to make it work I keep getting com.sun.codemodel#codemodel;2.5-FROZEN-AA: not found

So far I have this

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'
解决方案

Okay I managed to solve it

I had to add

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'
    mavenRepo urls: 'http://repository.excilys.com/content/repositories/thirdparty'
}

springAndroidVersion = '1.0.0.M4'
commonsHttpClientVersion = '3.1'
jacksonVersion = '1.8.5'
androidAnnotationsVersion = '2.1.1'

dependencies {
    compile "org.springframework.android:spring-android-rest-template:$springAndroidVersion"
    compile "commons-httpclient:commons-httpclient:$commonsHttpClientVersion"
    compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
    compile "com.googlecode.androidannotations:androidannotations:$androidAnnotationsVersion"
    compile "com.googlecode.androidannotations:androidannotations:$androidAnnotationsVersion:api"
}

这篇关于适应AndroidAnnotations Maven的设置,以摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 20:11