无法在以下项目配置之间进行选择:即时:- kapt - kaptDebug - kaptRelease

Cannot choose between the following configurations of project :instant: - kapt - kaptDebug - kaptRelease

我有一个带有即时模块的应用程序,即时模块只有 2 个依赖基础模块和一个功能模块。我试图生成签名的 apk,但我遇到了一个问题:

Cannot choose between the following configurations of project :instant:
  - kapt
  - kaptDebug
  - kaptRelease
All of them match the consumer attributes:
  - Configuration 'kapt':
      - Found artifactType 'processed-jar' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'release' but no value provided.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Metadata' but no value provided.
  - Configuration 'kaptDebug':
      - Found artifactType 'processed-jar' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'release' but no value provided.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Metadata' but no value provided.
  - Configuration 'kaptRelease':
      - Found artifactType 'processed-jar' but wasn't required.
      - Required com.android.build.api.attributes.BuildTypeAttr 'release' but no value provided.
      - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Metadata' but no value provided.

我生成了很多次apk,但是今天我有这个错误。当我尝试稍后提交时,他们也有这个问题,但一周前这个提交工作正常。

这是我的即时模块 gradle:

apply plugin: 'com.android.instantapp'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.2'
}

dependencies {
    implementation project(':base')
    implementation project(':bo')
}

这是我的功能模块:

dependencies {
    implementation project(':base')
    implementation project(path: ':settings')
    implementation project(':video-player')

    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'jp.wasabeef:blurry:2.1.1'
    implementation 'com.romandanylyk:pageindicatorview:1.0.1'
    implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'

    //RxJava
    implementation 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.0'

    //time ago
    implementation 'com.github.marlonlom:timeago:3.0.2'
    //Glide
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
}

正如@Hassan Ibraheem 所说,问题出在 instantapp 模块中 kotlin-androidkotlin-android-extensionsapply plugin 语句中。我只需要删除它们,因为这个模块不包含任何代码。