【发布时间】:2021-10-10 21:53:33
【问题描述】:
我正在尝试向我的应用程序添加一个动态模块,但我收到以下错误。当我尝试构建它时会发生这种情况:
Execution failed for task ':admin:generateDebugBuildConfig'.
> Error while evaluating property 'applicationId' of task ':admin:generateDebugBuildConfig'
> Failed to calculate the value of task ':admin:generateDebugBuildConfig' property 'applicationId'.
> Failed to query the value of property 'applicationId'.
> Collection is empty.'''
我正在使用:
Kotlin: 1.5.21
classpath("com.android.tools.build:gradle:7.1.0-alpha05")
这是我的管理模块的 build.gradle
plugins {
id 'com.android.dynamic-feature'
id 'kotlin-android'
}
android {
compileSdk 31
defaultConfig {
applicationId "io.github.diegoflassa.admin"
minSdk 24
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.6.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.annotation:annotation:1.2.0'
}
【问题讨论】: