1

Getting unresolved reference: ImmutableList error . what library do I need to import to remove this error? original code is from here: https://developer.android.com/google/play/billing/integrate#show-products

and android studio did not offer a library to import

screenshot

1 Answers1

0

You probably just need to add:

implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.5")

to your dependencies

JustSightseeing
  • 1,460
  • 3
  • 17
  • 37
  • now i get "Unresolved reference: of" –  Dec 13 '22 at 00:16
  • 1
    Oh, you probably are talking about Guava's immutableList, well then you probably should take a look at this: https://stackoverflow.com/a/48378440/15749574, btw, why won't you simply use a list.of() ? Lists are also not mutable and don't require additional dependencies – JustSightseeing Dec 13 '22 at 00:21
  • 1
    I see - I'm just getting the code the official Google documentation: https://developer.android.com/google/play/billing/integrate#show-products –  Dec 13 '22 at 00:23
  • 1
    You (or other people in the future) could also look at this: https://stackoverflow.com/a/72616597/15749574 – JustSightseeing Dec 13 '22 at 00:29