Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compose 1.6 #251

Merged
merged 39 commits into from
Apr 8, 2024
Merged

Compose 1.6 #251

merged 39 commits into from
Apr 8, 2024

Conversation

Tlaster
Copy link
Owner

@Tlaster Tlaster commented Jan 27, 2024

fix #197, #223

@Tlaster Tlaster linked an issue Jan 27, 2024 that may be closed by this pull request
@Tlaster Tlaster changed the title Update library versions in gradle/libs.versions.toml Compose 1.6 Jan 27, 2024
@Tlaster Tlaster linked an issue Feb 1, 2024 that may be closed by this pull request
@c4software
Copy link

Hi,

Could you please tag a new version with a bump of Compose Plugin to rc02 ("upgrade compose to 1.6.0-rc02")?

I encountered an issue with the latest tag (beta02) related to this problem: JetBrains/compose-multiplatform#4277

Thanks a lot,

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 20, 2024

Hi,

Could you please tag a new version with a bump of Compose Plugin to rc02 ("upgrade compose to 1.6.0-rc02")?

I encountered an issue with the latest tag (beta02) related to this problem: JetBrains/compose-multiplatform#4277

Thanks a lot,

PreCompose also have the same issue, waiting koin to upgrade.

@armond-avanes
Copy link

@Tlaster Is there any GitHub issue filed for Koin or any active PR that we can track the progress on that side?

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 20, 2024

@Tlaster Is there any GitHub issue filed for Koin or any active PR that we can track the progress on that side?

Not yet, I think koin team has their own release plan.

@c4software
Copy link

Hi,

Also, the latest tag seems have an issue with the go back implementation :

With beta02 I have crash when I do the go back gesture

FATAL EXCEPTION: main
Process: com.pmw.config.client, PID: 10702
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in /data/app/~~sz-R3_GfIP15OPg9lg5JTQ==/com.arcure.bxt5.config.client-l2AjiPOx5V5OqMDXusRqjw==/base.apk)
at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt:182)

No problem with the previous version.

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 20, 2024

Hi,

Also, the latest tag seems have an issue with the go back implementation :

With beta02 I have crash when I do the go back gesture

FATAL EXCEPTION: main
Process: com.pmw.config.client, PID: 10702
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in /data/app/~~sz-R3_GfIP15OPg9lg5JTQ==/com.arcure.bxt5.config.client-l2AjiPOx5V5OqMDXusRqjw==/base.apk)
at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt:182)

No problem with the previous version.

Can you check if you have compose material 1.6.0 as dependency?

@c4software
Copy link

Hi,
Also, the latest tag seems have an issue with the go back implementation :
With beta02 I have crash when I do the go back gesture

FATAL EXCEPTION: main
Process: com.pmw.config.client, PID: 10702
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in /data/app/~~sz-R3_GfIP15OPg9lg5JTQ==/com.arcure.bxt5.config.client-l2AjiPOx5V5OqMDXusRqjw==/base.apk)
at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt:182)

No problem with the previous version.

Can you check if you have compose material 1.6.0 as dependency?

Juste Compose.Material3 :

Capture d’écran 2024-02-20 à 16 01 41

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 20, 2024

Hi,
Also, the latest tag seems have an issue with the go back implementation :
With beta02 I have crash when I do the go back gesture

FATAL EXCEPTION: main
Process: com.pmw.config.client, PID: 10702
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in /data/app/~~sz-R3_GfIP15OPg9lg5JTQ==/com.arcure.bxt5.config.client-l2AjiPOx5V5OqMDXusRqjw==/base.apk)
at moe.tlaster.precompose.navigation.NavHostKt$NavHost$5.invoke(NavHost.kt:182)

No problem with the previous version.

Can you check if you have compose material 1.6.0 as dependency?

Juste Compose.Material3 :

Capture d’écran 2024-02-20 à 16 01 41

Can you check if add compose material works for you?

@c4software
Copy link

Same error implementation(compose.material)

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 20, 2024

Same error implementation(compose.material)

Can you check if add androidx.compose.material:material:1.6.1 as your Android dependency works for you?

@c4software
Copy link

Nop, same error with implementation("androidx.compose.material:material:1.6.1") in androidMain.dependencies

@c4software
Copy link

c4software commented Feb 20, 2024

@Tlaster Its look like the compose.animation is resolved in animation-core-android-1.7.0-alpha01, who does not have this signature method, but this one :

 class SeekableTransitionState<S>(
    initialState: S
) : TransitionState<S>() { /* […] */ }

Maybe you could tag a updated pre-release version based on your latest addition (ComposePlugin-rc02) ?

@Tlaster
Copy link
Owner Author

Tlaster commented Feb 21, 2024

@Tlaster Its look like the compose.animation is resolved in animation-core-android-1.7.0-alpha01, who does not have this signature method, but this one :

 class SeekableTransitionState<S>(
    initialState: S
) : TransitionState<S>() { /* […] */ }

Maybe you could tag a updated pre-release version based on your latest addition (ComposePlugin-rc02) ?

Before I can push a new release based on compose 1.6.0-rc02 (which I cannot do right now since koin is still not updating its compose dependency version), can you provide a sample that can reproduce this issue? It works fine here.

@c4software
Copy link

c4software commented Feb 21, 2024

@Tlaster Its look like the compose.animation is resolved in animation-core-android-1.7.0-alpha01, who does not have this signature method, but this one :

 class SeekableTransitionState<S>(
    initialState: S
) : TransitionState<S>() { /* […] */ }

Maybe you could tag a updated pre-release version based on your latest addition (ComposePlugin-rc02) ?

Before I can push a new release based on compose 1.6.0-rc02 (which I cannot do right now since koin is still not updating its compose dependency version), can you provide a sample that can reproduce this issue? It works fine here.

Hi try your branch too to confirm if it's my code or an incompatibility between versions.

And I confirm it's because the precompose-beta02 code is on the beta02 tag of the ComposePlugin, but my code is based on the rc02 ComposePlugin. I can produce a sample code but IDK If it's really useful.

Since the problem with koin is only with iOS, Its not a really a problem for me (my app is not in production right now). I will wait 👍

@c4software
Copy link

@Tlaster Is there any GitHub issue filed for Koin or any active PR that we can track the progress on that side?

Not yet, I think koin team has their own release plan.

It's happening (soon) InsertKoinIO/koin#1634 (comment)

@c4software
Copy link

c4software commented Mar 7, 2024

@Tlaster Its look like the compose.animation is resolved in animation-core-android-1.7.0-alpha01, who does not have this signature method, but this one :

 class SeekableTransitionState<S>(
    initialState: S
) : TransitionState<S>() { /* […] */ }

Maybe you could tag a updated pre-release version based on your latest addition (ComposePlugin-rc02) ?

Before I can push a new release based on compose 1.6.0-rc02 (which I cannot do right now since koin is still not updating its compose dependency version), can you provide a sample that can reproduce this issue? It works fine here.

Hi,

I still have the issue with the latest rc01 version.

java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in …

I'm on the latest 1.6.0 version compose-plugin = "1.6.0"

@c4software
Copy link

To complete my comment :

I also have a strange method resolution, in the documentation of SeekableTransitionState, we found this :

https://developer.android.com/reference/kotlin/androidx/compose/animation/core/SeekableTransitionState

<S : Any?> SeekableTransitionState(initialState: S)

But in my Android Studio, I have :

import androidx.compose.animation.core.SeekableTransitionState

class SeekableTransitionState<S>( initialState: S, override val targetState: S ) : TransitionState<S>() {

And, when my application run, its obviously crash :

java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in …

It's seems related to the 1.6.0 upgrade, but not sure why …

@Tlaster
Copy link
Owner Author

Tlaster commented Mar 7, 2024

To complete my comment :

I also have a strange method resolution, in the documentation of SeekableTransitionState, we found this :

https://developer.android.com/reference/kotlin/androidx/compose/animation/core/SeekableTransitionState

<S : Any?> SeekableTransitionState(initialState: S)

But in my Android Studio, I have :

import androidx.compose.animation.core.SeekableTransitionState

class SeekableTransitionState<S>( initialState: S, override val targetState: S ) : TransitionState<S>() {

And, when my application run, its obviously crash :

java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/Object;Ljava/lang/Object;)V in class Landroidx/compose/animation/core/SeekableTransitionState; or its super classes (declaration of 'androidx.compose.animation.core.SeekableTransitionState' appears in …

It's seems related to the 1.6.0 upgrade, but not sure why …

Which version of compose you're using for the android project?

@c4software
Copy link

Which version of compose you're using for the android project?

Same as yours. Its really strange, because on your latest commit I don't have the issue.

Capture d’écran 2024-03-07 à 14 33 53
Capture d’écran 2024-03-07 à 14 33 38

@Tlaster
Copy link
Owner Author

Tlaster commented Mar 7, 2024

@c4software I think accompanist might be the issue, 0.35.0-alpha is targeting compose 1.7, can you try version 0.34.0?

@c4software
Copy link

Oh yes ! Thats the root cause ! Thanks a lot.

@c4software
Copy link

Hi,

With the addition of Predictive Back is it possible to disable it for one scene in particular (it's works great, but in one of my screen the transition is not smooth) ?

@Tlaster
Copy link
Owner Author

Tlaster commented Mar 22, 2024

Hi,

With the addition of Predictive Back is it possible to disable it for one scene in particular (it's works great, but in one of my screen the transition is not smooth) ?

It is, you can just have a BackHandler in your screen and navigate back manually, the predictive back will be disable completely.
Note: 1.6.0-rc04 have issue with BackHandler and predictive back, 1.6.0-rc05 will fix this.

@Tlaster Tlaster marked this pull request as ready for review April 8, 2024 05:31
@Tlaster Tlaster merged commit c9441c2 into master Apr 8, 2024
6 checks passed
@Tlaster Tlaster deleted the compose-1.6 branch April 8, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants