https://kotlinlang.org logo
#compose
Title
# compose
t

tylerwilson

02/11/2021, 9:15 PM
Sorry, I know this is not directly related to compose, but this happened when i tried to go back to alpha11 from alpha12. I now have these Duplicate errors like so:
Copy code
Duplicate class androidx.compose.runtime.savedinstancestate.ExperimentalRestorableStateHolder found in modules jetified-runtime-saveable-1.0.0-alpha12-runtime (androidx.compose.runtime:runtime-saveable:1.0.0-alpha12) and jetified-runtime-saved-instance-state-1.0.0-alpha11-runtime (androidx.compose.runtime:runtime-saved-instance-state:1.0.0-alpha11)
Anybody here know how to clean out the jetifier cache? I tried cleaning all Gradles caches, but that did not fix it. Thanks!
j

jim

02/11/2021, 9:16 PM
Try running
./gradlew app:dependencies --no-daemon
which will dump a tree of all dependencies and why they got resolved. You are looking for references to
alpha11
and will want to upgrade those dependencies to their
alpha12
variants.
I am curious to see which dependency is pulling in
alpha11
, as you are not the first person to mention seeing this after upgrading.
t

tylerwilson

02/11/2021, 9:18 PM
To be clear, I am trying to go back to alpha11. I cannot use Kotlin 1.4.30 due to some Result bug, so I am trying to get everything back to where it was (using Kotlin 1.3.21-2).
j

jim

02/11/2021, 9:20 PM
Well, same debugging advice applies, except in reverse. Identify
alpha12
dependencies and remove them.
Also, if you encounter a compiler bug, please file the bug so we're aware.
t

tylerwilson

02/11/2021, 9:20 PM
Right, working on it. 🙂 I did an invalidate caches and now it downloading everything again. 😕
Okay, had to update my Java to 11 to run gradlew. This is an example of what I see, though I am no expert. I am not referring to alpha12, so perhaps it is trying to be smart and move up to the latest version for me?
Copy code
+--- androidx.compose.ui:ui-tooling:1.0.0-alpha11
|    +--- androidx.annotation:annotation:1.1.0 -> 1.2.0-alpha01
|    +--- androidx.compose.runtime:runtime:1.0.0-alpha11 -> 1.0.0-alpha12 (*)
|    +--- androidx.compose.ui:ui:1.0.0-alpha11 -> 1.0.0-alpha12 (*)
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.21-2 -> 1.4.30 (*)
|    \--- androidx.compose.material:material:1.0.0-alpha11
|         +--- androidx.compose.animation:animation-core:1.0.0-alpha11 -> 1.0.0-alpha12 (*)
|         +--- androidx.compose.foundation:foundation:1.0.0-alpha11 -> 1.0.0-alpha12
|         |    +--- androidx.annotation:annotation:1.1.0 -> 1.2.0-alpha01
|         |    +--- androidx.compose.animation:animation:1.0.0-alpha12
|         |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.2.0-alpha01
|         |    |    +--- androidx.compose.animation:animation-core:1.0.0-alpha12 (*)
|         |    |    +--- androidx.compose.foundation:foundation-layout:1.0.0-alpha12
|         |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.2.0-alpha01
i

Ian Lake

02/11/2021, 9:49 PM
-> 1.0.0-alpha12
means something other artifact is moving you to
alpha12
t

tylerwilson

02/11/2021, 9:50 PM
son of a ….
…accompanist-coil:0.5.1 😞
thank you. i am working too late here…
i

Ian Lake

02/11/2021, 9:51 PM
that'll do it. Glad you were able to track it down!
t

tylerwilson

02/11/2021, 9:52 PM
ditto. i am looking forward to when everything is done and stable and nothing like this can happen again. hahaha
2
s

Scott Kruse

02/13/2021, 8:55 AM
I had a similar issue happen to me after upgrading to
alpha12
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1613204163376100
2 Views