2

我在 Android 项目中遇到由以下依赖项引起的构建错误:
implementation "com.algolia:instantsearch-android:2.5.1"
它有助于升级到 2.8.0,但我不希望因为它需要 minSdk 21。

Gradle 6.5
Android Gradle 插件:4.0.2
Kotlin 1.3.72

Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not resolve com.algolia:algoliasearch-client-kotlin-common:1.4.0.
     Required by:
         project :app > com.algolia:instantsearch-android:2.5.1
      > No matching variant of com.algolia:algoliasearch-client-kotlin-common:1.4.0 was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - Variant 'metadata-api' capability com.algolia:algoliasearch-client-kotlin-common:1.4.0:
              - Incompatible because this component declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
              - Other compatible attribute:
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'release')
4

0 回答 0