AAkira / Napier

Logging library for Kotlin Multiplatform
Apache License 2.0
786 stars 34 forks source link

Could not resolve com.github.aakira:napier-android:1.4.1 #52

Closed amatsegor closed 4 years ago

amatsegor commented 4 years ago

Was wrong closing a previous issue, sorry

Updated to version 1.4.1 from 1.3.9, tried to run a :commonCode:build task and got this

` Could not determine the dependencies of task ':commonCode:lint'. Could not resolve all artifacts for configuration ':commonCode:debugCompileClasspath'.

Could not resolve com.github.aakira:napier-android:1.4.1. Required by: project :commonCode No matching variant of com.github.aakira:napier-android:1.4.1 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 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:

  • Variant 'android-releaseApiElements' capability com.github.aakira:napier-android:1.4.1 declares an API of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
  • Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
  • Variant 'android-releaseRuntimeElements' capability com.github.aakira:napier-android:1.4.1 declares a runtime of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
  • Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug'
  • Variant 'metadata-api' capability com.github.aakira:napier-android:1.4.1:
  • Incompatible because this component declares a usage of 'kotlin-metadata' 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 'debug')
  • Variant 'metadata-commonMainMetadataElements' capability com.github.aakira:napier-android:1.4.1:
  • 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 'debug') `
amatsegor commented 4 years ago

After commenting out the -android dependency, got this

`

Could not resolve all files for configuration ':commonCode:iosCompileKlibraries'. Could not find com.github.aakira:napier-ios:1.4.1. Searched in the following locations:

So my Gradle configuration seem to be ok, repos are on place

starsep commented 4 years ago

I had the same issue in my Android-only project while updating from 1.4.0 to 1.4.1 I followed the suggestion from #47 and changed "com.github.aakira:napier-android:$napierVersion" to "com.github.aakira:napier:$napierVersion"

amatsegor commented 4 years ago

Oh, should've checked Thank you, works!

AAkira commented 4 years ago

@starsep Thank you!

I add the changelog. https://github.com/AAkira/Napier/releases/tag/1.4.1