【发布时间】:2018-03-17 22:08:27
【问题描述】:
Android 库项目:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
apply plugin: 'com.android.library'
错误
What went wrong:
A problem occurred evaluating script.
> Plugin with id 'com.android.library' not found.
如果我创建一个根项目,并将 android 库设为模块,并将 buildscript 移动到根项目,它将起作用。
根项目:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
Android 库项目:
apply plugin: 'com.android.library'
settings.gradle:
include 'my-aar-project'
Android库可以是没有根项目的独立项目吗?换句话说,我们可以将 AAR 项目构建为单个项目(而不是多项目构建)吗?
【问题讨论】:
标签: android gradle android-library