jump-sdk / jetpack_compose_country_code_picker_emoji

Jetpack Compose Country Code Picker with Emoji Flags
https://jitpack.io/#jump-sdk/jetpack_compose_country_code_picker_emoji
Apache License 2.0
51 stars 18 forks source link

Cannot access class 'androidx.compose.material.TextFieldColors'. Check your module classpath for missing or conflicting dependencies #23

Closed dyazincahya closed 1 year ago

dyazincahya commented 1 year ago

Describe the bug I have an error like this Cannot access class 'androidx.compose.material.TextFieldColors'. Check your module classpath for missing or conflicting dependencies

Spec

image

hbmartin commented 1 year ago

Hi @dyazincahya , I suspect this is due to conflicting versions of compose (specifically androidx.compose.material:material in this case) which is currently being built with 1.5.0 https://github.com/jump-sdk/jetpack_compose_country_code_picker_emoji/blob/master/gradle/libs.versions.toml#L21 Can you see if changing this dependency version fixes the issue?

hbmartin commented 1 year ago

Note that in the 2.1.1 release Compose was upgraded to 1.5.1

Closing this now, feel free to reopen if the problem persists after applying the above suggestion.

waheedkhan-dev commented 1 year ago

Hi @hbmartin I am facing the same issue

hbmartin commented 1 year ago

@waheedkhan-dev what Compose version are you using?

cw-communiski commented 1 year ago

I had this problem using Material3 - I added Material2 as well and this issue went away:

implementation("androidx.compose.material:material:1.5.2")

(I still can't get it to build though as I'm getting other errors)

hbmartin commented 1 year ago

@cw-communiski can you post of log of the other build errors?

waheedkhan-dev commented 1 year ago

@hbmartin image image

hbmartin commented 1 year ago

@waheedkhan-dev can you try adding to you dependencies implementation("androidx.compose.material:material:1.5.2")

dyazincahya commented 1 year ago

Note that in the 2.1.1 release Compose was upgraded to 1.5.1

Closing this now, feel free to reopen if the problem persists after applying the above suggestion.

Thank you @hbmartin :fire:

waheedkhan-dev commented 1 year ago

I have add the material 2 dependency the error gone but now i want to change the background color of text field but it also change the country dialog background color as well

image

image

image