Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Project - Failed to resolve: io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 #214

Closed
tagy opened this issue Jun 12, 2024 · 9 comments

Comments

@tagy
Copy link

tagy commented Jun 12, 2024

Have this in my build.gradle and it works fine:

implementation("io.github.pdvrieze.xmlutil:core-android:0.86.3") implementation("io.github.pdvrieze.xmlutil:serialization-android:0.86.3")

But updating it to:

implementation("io.github.pdvrieze.xmlutil:core-android:0.90.0-RC3") implementation("io.github.pdvrieze.xmlutil:serialization-android:0.90.0-RC3")

Gives me: Failed to resolve: io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3

More details shows:

`No matching variant of io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.4.1' but:

  • Variant 'iosArm64ApiElements-published' capability io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 declares a library, preferably optimized for non-jvm:
    • Incompatible because this component declares a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
    • Other compatible attributes:
      • Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.4.1')
      • Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
  • Variant 'iosArm64MetadataElements-published' capability io.github.pdvrieze.xmlutil:core-base:0.90.0-RC3 declares a library, preferably optimized for non-jvm:
    • Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native' and the consumer needed a component for use during compile-time, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'
    • Other compatible attributes:
      • Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.4.1')
      • Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')`
@pdvrieze
Copy link
Owner

I've managed to reproduce it. I'll be removing the hijinks with packages. Instead the JVM/Android specific code will not be included automatically by depending on core (but will be included for serialization).

@FooIbar
Copy link

FooIbar commented Jun 13, 2024

It still persists on 0.90.0

No matching variant of io.github.pdvrieze.xmlutil:core:0.90.0 was found.

  • Variant 'jvmCommonApiElements-published' declares a library for use during compile-time, preferably optimized for standard JVMs:
    • Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'

@pdvrieze
Copy link
Owner

Can you share some of your configuration. It should be permissible for the jvm variant to resolve against Android (it will work).

@FooIbar
Copy link

FooIbar commented Jun 13, 2024

serialization-xml-core = { module = "io.github.pdvrieze.xmlutil:core-android", version.ref = "xmlutil" }
serialization-xml = { module = "io.github.pdvrieze.xmlutil:serialization-android", version.ref = "xmlutil" }

Here is the build log: https://github.com/FooIbar/EhViewer/actions/runs/9498750818/job/26178131607

@lihenggui
Copy link

Same error happened in this project:
https://github.com/lihenggui/blocker/actions/runs/9499196227/job/26179580664

@hfhbd
Copy link

hfhbd commented Jun 14, 2024

Just a curious qustion, why do you create an jvm target named android manually instead using the androidTarget which will setup all correct Gradle attributes automatically?

@pdvrieze
Copy link
Owner

pdvrieze commented Jun 14, 2024

@hfhbd The reason is that this is not build against the Android SDK (creating an AAR), but it is actually just a regular Jar that is optimized for use in Android. I actually found the cause, there is an explicit dependency on the now no longer existing android variant of core. It should be fixed soon (0.90.1)

pdvrieze added a commit that referenced this issue Jun 14, 2024
…onger exists. Causes build issue for android projects: #214.
@JordanLongstaff
Copy link

How soon will it release?

@pdvrieze
Copy link
Owner

I am releasing it now, it should be soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants