Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle doesn't look for dependency in the right way

I'm trying to add moko a dependency to a kotlin multiplataform on gradle.

org.gradle.internal.resolve.ArtifactNotFoundException: Could not find mvvm-livedata-0.9.1-samplessources.jar (dev.icerock.moko:mvvm-livedata:0.9.1). Searched in the following locations: https://dl.bintray.com/icerockdev/moko/dev/icerock/moko/mvvm-livedata/0.9.1/mvvm-livedata-0.9.1-samplessources.jar

it looks like the "-samplessources" part of the link shouldn't be there, but a don't know how to remove it.

enter image description here

enter image description here

enter image description here

like image 706
Jhonata Ávila Avatar asked Jan 25 '21 21:01

Jhonata Ávila


1 Answers

If someone else is facing a similar problem (with missing your-library-name-samplessources.jar) Usually, this is happening when your multiplatform project tries to consume the library, which doesn't support all the targets you have declared in your project. For example, you have an ios() target, while the library doesn't produce any native artifact. To understand which targets of your projects are not covered by the library, you could try to build your project by calling

./gradlew build  

You will receive a comprehensive error, describing which library variant wasn't found (ios_x64 in my case): enter image description here

like image 173
KaterinaPetrova Avatar answered Oct 06 '22 00:10

KaterinaPetrova