koin Questions

2

Within our Android app we are using Google Maps API in order to show the users location. At the moment we are using Koin in order to provide a parametered injection (it requires an activity) of the...
Ridenour asked 16/7, 2019 at 8:45

2

Solved

I'm following the docs as stated her https://insert-koin.io/docs/reference/koin-android/viewmodel/#viewmodel-and-injection-parameters The only difference is my viewmodel has 2 (besides Koin injecte...
Affettuoso asked 23/12, 2021 at 9:19

3

I like to keep the number of third party libraries used in my Android Apps to an absolute minimum. I had started using Dagger2, then switched to Koin. Koin is such a great improvement on Dagger2. K...
Xeniaxeno asked 13/11, 2020 at 16:18

3

I'm using Koin 3.2 which has the new module includes feature. In the official docs, when discussing module linking strategies, there is this paragraph: An important detail to observe is that you c...
Wendellwendi asked 4/8, 2022 at 12:24

1

Does Koin provide the functionality of binding several dependencies into a collection, as Dagger does with multibindings? Let's suppose I have this interface: interface Initializer: (Application...
Vertical asked 12/9, 2019 at 12:48

3

Solved

I want to use share same viewmodel instance in koin in jetpack compose navigation. I know there is a function in koinViewModel() to get instance of viewModel. I recently saw a Koin Documentation ha...

4

Solved

I want to use Jetpack Compose in my App. I am already using Koin for DI. Because I have a lot of convenience methods in my BaseFragment I want to inherit from it and build the corresponding view wi...

6

I tried to replace Koin with Hilt (bad idea) for DI and now I'm stuck with this error: Hilt_App.java:21: error: cannot find symbol return DaggerApp_HiltComponents_ApplicationC.builder() ^ symbol: v...
Expose asked 10/7, 2020 at 11:39

7

Solved

I want to store some preferences using DataStore. But the problem is that my application can have multiple users and therefor needs to store these preferences in separate files. I got a working exa...

3

Solved

I'm trying to implement Koin in my project. So far, I did this: My shared preferences class: class MPCUtilSharedPreference(private val sharedPreferences: SharedPreferences{} I want to inject th...
Chaing asked 16/4, 2020 at 21:30

3

Solved

Cannot use "by viewModel" from Activity I want to inject a ViewModel for an Activity, so I tried this. But it was failed, Android Studio cannot find reference of it. private val mainViewM...
Apotheosize asked 22/11, 2020 at 10:39

4

Solved

Consider this example. For authentication, we'll be using 2 screens - one screen to enter phone number and the other to enter OTP. Both these screens were made in Jetpack Compose and the for the Na...

3

Im trying to implement a Permission Injection using Koin as my D.I however when i execute my ViewModel that requires the PermissionRepository i keep receiving the error. No definition found for ...
Emotionalize asked 10/4, 2020 at 20:21

1

Solved

I'm working with such tutorial. I added own modules and viemodel like in this tutorial, only changed implementations: implementation "io.insert-koin:koin-core:3.0.2" implementation "...
Lament asked 24/3, 2023 at 14:11

1

I am developing an Android application with Kotlin in which I need to get the current location of the mobile device. I've already found a way to do it in various examples, but I don't know how to i...
Accent asked 4/5, 2020 at 14:12

6

There are two modules in my android project, app module and lib module. Both these two modules need Koin for D.I., so I call startKoin in MyApplication class in app module, and IninKointContentPro...
Tendance asked 24/5, 2019 at 9:42

3

Solved

How do you achieve the following using Koin DI: single { AValidator() } bind IValidator::class single { BValidator() } bind IValidator::class single { CValidator() } bind IValidator::class single ...
Torgerson asked 25/1, 2019 at 23:18

4

Solved

I have viewModel for my ProfileScreen. @Composable fun ProfileScreen() { val viewModel: ProfileViewModel = viewModel() ... } Every time when I call ProfileScreen, new viewModel is created. How c...

2

Solved

I am trying to use Koin to inject my viewModel (which has some dependencies as well) like this: I don't understand why it cannot find getViewModel when I have the following import: I am using thi...
Efferent asked 29/3, 2022 at 12:55

5

I am learning kotlin using koin. While running the application in catlog I see the following message. java.lang.IllegalStateException: KoinApplication has not been started though I have used startK...
Hobart asked 11/1, 2020 at 2:51

4

Solved

I'm developing an application based on Koin DI (ver : 1.0.1) with 2 modules(:app and :network). I have a requirement in :network module to have "Context". Below is how I implemented: **Module**: v...
Lexine asked 22/11, 2018 at 23:38

4

Solved

Got that message error java.lang.RuntimeException: Unable to create application com.app.name.application.MainApplication: org.koin.error.BeanInstanceCreationException: Can't create bean Bean[class...
Tonneson asked 5/7, 2018 at 15:48

4

Solved

I am using Koin library in Kotlin for DI Koin providing by viewmodel() for get instance of ViewModel by sharedViewModel() to get same instance in fragments. How can I get same instance of the V...
Wholism asked 17/7, 2019 at 14:3

7

Solved

Using koin-2.0.1 for Android testing and unable to test all 3 test together though each test passes separately. class NumberFormatterUtilImplTest : KoinTest { private val numberFormatterUtil: Nu...
Congeal asked 15/7, 2019 at 11:34

2

I'm using two library that have dependencies of two different versions of Koin. One of the library has org.koin:koin-android:2.0.1 and the other has io.insert-koin:koin-core-jvm:3.0.1 dependencies....
Dalessandro asked 23/6, 2021 at 19:16

© 2022 - 2025 — McMap. All rights reserved.