https://kotlinlang.org logo
Title
a

Andy Victors

05/08/2019, 8:58 AM
Anyone is using
<https://github.com/florent37/Multiplatform-Preferences>
? Gradle imports this dependency successfully and the symbol is recognized but I get the compile error
Unresolved reference: Preferences
when trying to use it
d

Dennis L

05/08/2019, 9:48 AM
This is a MPP project right? If yes you need to import common and iOS into the correct modules too
Also you might want to use https://github.com/russhwolf/multiplatform-settings instead it's actually updated
a

Andy Victors

05/08/2019, 10:03 AM
import common and iOS into the correct modules
sorry, did not get what you meant with this one. I only import this "Preferences" in the app code
I tried russhwolf but stopped at some point since I did not get how to use it
d

Dennis L

05/08/2019, 11:06 AM
These libaries are for Kotlin Multi Platform libaries, you have to put a common import into the common library (implementation "com.gitub.florent37:multiplatform-preferences:1.0.0") and the android import into the android module implementation "com.gitub.florent37:multiplatform-preferences-ios:1.0.0" into the ios module if you're using ios in your kotlin multi platform project
else you get unresolved reference errors, though your issue sounds like you're using a jvm target and not an android one
a

Andy Victors

05/08/2019, 11:48 AM
Yes you were right, after changing to android presets all things started to work. thank you!