android - 无法从项目生成 aar 文件
问题描述
我是从 android studio 创建库的新手。我一直在开发者网站上阅读本教程。因此,为了尝试它,我创建了一个新项目,并且没有做任何事情,我编辑了应用程序级别的 build.gradle 文件,它的外观如下:
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
现在,当我尝试构建 apk(应该构建 aar 文件)时,并没有构建任何东西,因为我在构建 apk 时看不到任何确认消息,也无法在 app/build/outputs 中找到任何内容文件夹..
我哪里错了?教程中有什么我理解错误的地方吗?
解决方案
推荐阅读
- docker - 如何编写 Dockerfile 来运行另一个 docker 容器
- typescript - javascript set.has() 不是函数
- python - 无法从 python shell 运行 celery 任务
- php - 如何最好地使用 mb_convert_case 和像 o'hare 这样的字符串来实现 ucwords($str," '-")?
- ios - 当应用于 WKWebView 中的视频 srcObject 时,有什么方法可以防止 getUserMedia“直播”?
- python - 列表包含 Python 中的列表
- acumatica - 为什么这个字段没有被添加到 SOLine 表中
- javascript - 无法读取未定义的属性。但是属性是导入类的静态函数
- c# - C# 不应该接受具有名字和姓氏的重复 ID
- javascript - 如何使用 JavaScript 将句子的第一个字符大写?