compose-multiplatform
compose-multiplatform copied to clipboard
Unresolved reference: LazyVerticalGrid on Android
Hi,
I'm developing a multiplatform application targeting JVM and Android. As you can see on the screen, when I'm trying to run the application on Android I'm receiving this error, while on the JVM everything is working correctly. I have to mention when substituting imports androidx.compose.foundation.lazy.LazyVerticalGrid
on android is working but on the desktop is crashing because it is the wrong path.
kotlinVersion: 1.6.21
compose: 1.2.0-alpha01-dev679
Still actual in 1.2.0-alpha01-dev741
Still actual in
1.2.0-alpha01-dev741
I use 1.2.0-alpha01-dev741 the problem still exist, please have a look
I am experiencing the same on v1.2.1
@norcisa-andy It's still there. I discovered that it moved to another package.
It's now androidx.compose.foundation.lazy.grid.LazyVerticalGrid
I didn't find 'lazy' package in androidx.compose.foundation.lazy.grid.LazyVerticalGrid. compose_version = '1.3.2'
compose 1.3.2 遇到同样问题
compose Version1.2.0-beta02
fixed it to me
I made a sample with usage of LazyVerticalGrid in commonCode between Android and Desktop: https://github.com/dima-avdeev-jb/desktop-android-lazy-vertical-grid It work's fine.
This is no longer reproducible in 1.2.2. This was because LazyVerticalGrid
was/is experimental, and we have incompatible APIs in different versions of compose.foundation
(androidx.compose.foundation.lazy.LazyVerticalGrid
in common/desktop, androidx.compose.foundation.lazy.grid.LazyVerticalGrid
in Android). In case of dev releases we can use different versions for Desktop and Android targets. This is not the case for stable releases though, everything should be okay in them.
We will look how we can improve dev releases. Usually when we rebase only on stable commits of androidx
repository, there should be no such issues.
Similar issue for material3 library, that became stable only recently.