compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Unresolved reference: LazyVerticalGrid on Android

Open ynsok opened this issue 2 years ago • 2 comments

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.

image

kotlinVersion: 1.6.21 compose: 1.2.0-alpha01-dev679

ynsok avatar May 13 '22 14:05 ynsok

Still actual in 1.2.0-alpha01-dev741

egorikftp avatar Jul 07 '22 12:07 egorikftp

Still actual in 1.2.0-alpha01-dev741

I use 1.2.0-alpha01-dev741 the problem still exist, please have a look

happyjun avatar Aug 02 '22 11:08 happyjun

I am experiencing the same on v1.2.1

norcisa-andy avatar Oct 13 '22 16:10 norcisa-andy

@norcisa-andy It's still there. I discovered that it moved to another package.

It's now androidx.compose.foundation.lazy.grid.LazyVerticalGrid

StefanOltmann avatar Oct 14 '22 06:10 StefanOltmann

I didn't find 'lazy' package in androidx.compose.foundation.lazy.grid.LazyVerticalGrid. compose_version = '1.3.2'

sooshil avatar Dec 26 '22 17:12 sooshil

compose 1.3.2 遇到同样问题

iletleon avatar Jan 01 '23 04:01 iletleon

compose Version1.2.0-beta02 fixed it to me

hodakl099 avatar Jan 02 '23 10:01 hodakl099

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.

dima-avdeev-jb avatar Jan 02 '23 10:01 dima-avdeev-jb

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.

igordmn avatar Jan 02 '23 12:01 igordmn