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

nlindberg

10/04/2020, 11:04 AM
Anyone tried getting the following error when using ScrollableColumn composable: (version: ‘1.0.0-alpha04’)
Copy code
java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
5
r

Rudolf Tammekivi

10/04/2020, 11:09 AM
Also some other composables are affected. It is reported and should be solved in alpha05
n

nlindberg

10/04/2020, 11:09 AM
Aight thx, ill try to switch back to alpha03 for now then.
c

caelum19

10/04/2020, 12:13 PM
Trying to as well, can't resolve compiler alpha 03 anymore 😕
n

nlindberg

10/04/2020, 12:14 PM
Try add in your project gradle. It says in the crane sample project “// Crane uses Compose alpha03 and Android Gradle Plugin 4.2.0-alpha13 which are incompatible”
Copy code
configurations.configureEach {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def group = details.requested.group
        def module = details.requested.module.name
        def version = details.requested.version

        if (group == 'androidx.compose.compiler' && module == 'compiler') {
            details.useTarget("androidx.compose:compose-compiler:$version")
        }
    }
}
1
c

caelum19

10/04/2020, 12:45 PM
Ah that works thanks!
👍 1
3 Views