Hi I’m having an issue with expect/actual composab...
# compose-desktop
r
Hi I’m having an issue with expect/actual composable function when built from scratch app works without exception but when make any change to my app and rerun sometimes throwing error
java.lang.NoSuchMethodError: No static method Blablabla
j
Sounds like a build cache issue. What happens if you do
rm -rf ~/.gradle
and then do a
./gradlew clean
before your build?
r
I tried it it is occurring again and again Every time i have to clear and wait for build
j
You mentioned that when you "make any change" it sometimes throws the error. If you make no changes and do a clean build, does it throw the error?
r
No if I do clean build it won't throw Only when applying changes
I think the issue is related to the kotlin compiler
j
To be clear, we aren't talking about Android's "apply changes" feature, right? 🧐
If the bug appears whenever you make changes, that still sounds like a cache issue of some sort. If you can post a copy of the project with some repro instructions, we can take a look.
r
Oh I misunderstood you. Now I'm removing the root .
gradle
folder and trying to rebuild and check If the issue occurs again
Now it is not updating my changes. When I first uninstall and run the app I can see the changes
j
When you first uninstall and run the app?
To be clear, are we talking about an Android app here or a Desktop app?
Usually when you run the Desktop app for development, you are using the
:run
target, and there is no install/uninstall process.
r
I'm talking about android app. After all the issue still exists. Again when I change app the expect/actual composable function is missing in runtime. Every time when this occurs I'm uninstalling the app and rerunning gradle
I'm using stable AS Arctic Fox, agp 7.0.0, compose 0.5. 0-build270, kotlin 1.5.21
Something wrong with hot swapping
I’m fed up with this issue