Closed CaptnBlubber closed 3 years ago
Adding some info here, it looks like the latest commit isn't available as a snapshot on Sonatype. I'm guessing the snapshot that's included here still uses Compose Alpha 11 or 12. Either manual deployment is needed or we fix deployment from CI.
Hmm, it looks like something funky happened with the deploy action. I'll take a look https://github.com/airbnb/lottie-android/runs/1973198319
I just manually pushed a new snapshot
I've updated to 1.0.0-alpha07-SNAPSHOT
and everything works well with compose 1.0.0-beta01
.
Working marvelous! I guess the issue can be closed :)
Where can I download this 1.0.0-alpha07-SNAPSHOT?
@peterfortuin Please follow the docs at http://airbnb.io/lottie/#/android-compose for that :) You'll need to add the Sonatype snapshot repository to your repositories.
@jossiwolf Thanks for the fast response. I got it to work.
Sorry for hijacking this issue, wasn't sure the best place to get in touch but is anyone having issues grabbing the snapshot? I'm trying to update to the snapshot due to the runtime issue above but i can never get it to resolve. I've added the snapshot repository and the package and just get the standard failed to resolve error.
I presume I am missing something obvious, is there a way to browse the snapshot repository to see what is available? Am i trying to grab the right package?
Failed to resolve: com.airbnb.android:lottie-compose:1.0.0-alpha07-SNAPSHOT
Thanks!
@nathan-castlehow You can browse the snapshot repo at oss.sonatype.org :) The latest version is definitely there and I can pull it.
Can you show us how you added the repository and the dependency?
Hmm weird. Thanks so much for getting back to me @jossiwolf . That link is also super helpful! :)
The gradle files are using the gradle dsl.
So in my top level gradle build file I have added
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
to the repositories.
In my app level gradle file I have
implementation "com.airbnb.android:lottie-compose:1.0.0-alpha07-SNAPSHOT"
I presume I am missing something obvious (like something wrong with some syntax somewhere)
That's definitely odd! This should all be correct - have you added the repo declaration to the allprojects
or subprojects
block (assuming you have a standard setup)?
// Top-level buildscript
allprojects {
repositories {
...
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
I had added it to the repositories in the build script block instead of the all projects block :man_facepalming:
Thanks so much for seeing that one through with me @jossiwolf . Very much appreciated!
This error typically occurs when the required class or dependency is not present in the classpath. In your case, it seems that the Landroidx/compose/runtime/MutableStateKt class is missing from the classpath.
To resolve this issue, make sure you have the necessary dependencies and libraries configured correctly in your project. Specifically, ensure that you have the required version of the Android Compose library (androidx.compose.runtime) available and properly linked to your project.
Here are a few steps you can take to troubleshoot and resolve the issue:
Double-checking your project configuration, dependencies, and ensuring that the necessary libraries are correctly specified and available should help resolve the NoClassDefFoundError related to androidx.compose.runtime.MutableState.
When following the documentation and fetching the latest snapshot from sonatype the app will crash when using beta-01 versions of compose with a Class not found exception:
I already did some investigations and it seems like although the code already is updated in github the snapshot is not properly pushed.
Here is the output form
./gradlew dependencies
:My current workaround: I have cloned the repository and included a selfcompiled
.aar
for now.