对于Kotlin开发环境的配置,可查看 Kotlin配置AndroidAnnotations
对于app的module中使用AndroidAnnotations,配置使用都很简单,网上有很多文章。但是对于library中使用Androidannotations,需要使用resName指定资源或者使用butterknife生成R2
一:先说根build.gradle配置:AndroidAnnotations的maven仓库
// 此配置在新版中可能会放到settings.gradle中
allprojects {
repositories {
mavenCentral()
mavenLocal()
jcenter()
google()
//androidannotations仓库地址
maven {
url = 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
}
二:app的build.gradle配置:
def AAVersion = "4.9.0-SNAPSHOT"
//annotations配置
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotat