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

[Android] App crashes if not using Ktor platform client #720

Closed
Monabr opened this issue Oct 27, 2024 · 2 comments · Fixed by #734
Closed

[Android] App crashes if not using Ktor platform client #720

Monabr opened this issue Oct 27, 2024 · 2 comments · Fixed by #734
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Monabr
Copy link

Monabr commented Oct 27, 2024

Ktorfit version

2.1.0

What happened and how can we reproduce this issue?

So the docs states there is no need in additional configuration.

If I just use

            implementation(libs.ktorfit.lib)
            implementation(libs.ktor.client.serialization)
            implementation(libs.ktor.client.content.negotiation)
            implementation(libs.ktor.serialization.kotlinx.json)

and start the app - I get the error:

java.lang.NoClassDefFoundError: Failed resolution of: Lio/ktor/client/plugins/HttpTimeout;

If I add platform clients (okhttp and darwin) and use them - the app works fine

What did you expect to happen?

Docs be accurate or there is was not bug

Is there anything else we need to know about?

No response

@Monabr Monabr added the bug Something isn't working label Oct 27, 2024
@geworfener
Copy link

Having the same problem, on iOS only though:

Caused by: kotlin.IllegalStateException: Failed to find HttpClientEngineContainer. Consider adding [HttpClientEngine] implementation in dependencies.

@Foso Foso self-assigned this Nov 10, 2024
Foso added a commit that referenced this issue Nov 10, 2024
@Foso Foso linked a pull request Nov 10, 2024 that will close this issue
1 task
Foso added a commit that referenced this issue Nov 10, 2024
Foso added a commit that referenced this issue Nov 10, 2024
@Foso Foso closed this as completed in #734 Nov 10, 2024
@Foso Foso added this to the 2.2.0 milestone Nov 10, 2024
@Foso
Copy link
Owner

Foso commented Nov 10, 2024

It's fixed with Ktorfit 2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants