touchlab / Stately

Kotlin Multiplatform State Library
https://touchlab.co
Apache License 2.0
601 stars 28 forks source link

Please, add maven central information in README #14

Closed tonilopezmr closed 3 years ago

tonilopezmr commented 5 years ago

I'm still don't know how to add this library properly on my project.

ERROR: Unable to resolve dependency for ':shared@debug/compileClasspath': Could not resolve co.touchlab:stately:0.9.2.
adding this to repositories: mavenCentral()

adding this to dependencies: implementation "co.touchlab:stately:0.9.2"

Edit:

* What went wrong:
Could not determine the dependencies of task ':androidApp:lintVitalRelease'.
> Could not resolve all task dependencies for configuration ':androidApp:releaseRuntimeClasspath'.
   > Could not resolve co.touchlab:stately:0.9.2.
     Required by:
         project :androidApp > project :shared
      > Could not resolve co.touchlab:stately:0.9.2.
         > Could not parse module metadata https://jcenter.bintray.com/co/touchlab/stately/0.9.2/stately-0.9.2.module
            > Unsupported format version '1.0' specified in module metadata. This version of Gradle supports format version 0.4 only.
      > Could not resolve co.touchlab:stately:0.9.2.
         > Could not parse module metadata https://repo1.maven.org/maven2/co/touchlab/stately/0.9.2/stately-0.9.2.module
            > Unsupported format version '1.0' specified in module metadata. This version of Gradle supports format version 0.4 only.

It seems something like that: https://github.com/Kotlin/kotlinx.coroutines/issues/564

The library repository uses formatVersion "1.0" instead of "0.4"

kpgalligan commented 5 years ago

You probably need to update Gradle. Probably version 5.3+ (if this blog post is accurate: https://blog.gradle.org/gradle-metadata-1.0)

tonilopezmr commented 5 years ago

I'm using 5.3.1-all.zip like the example, thanks for the answer @kpgalligan

kpgalligan commented 5 years ago

Are you still having the same issue with 5.3.1?

tonilopezmr commented 5 years ago

Yes! It seems the first time I ran after upgrade to 5.3.1-all the cache wasn't clean, thanks! I will add dependency information in the README later