closestKodein is not working with androidx.fragment.app.Fragment
See original GitHub issueim using
implementation 'org.kodein.di:kodein-di-generic-jvm:6.3.0'
implementation 'org.kodein.di:kodein-di-framework-android-x:6.3.0'
and here’s the fragment class
...
import androidx.fragment.app.Fragment
import org.kodein.di.KodeinAware
import org.kodein.di.android.closestKodein
class LoginFragment : Fragment(), KodeinAware {
override val kodein by closestKodein()
...
}
is says: Property delegate must have a 'ProvideDelegate…
what am i missing?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
closestKodein is not working with androidx.fragment ... - GitHub
im using implementation 'org.kodein.di:kodein-di-generic-jvm:6.3.0' implementation 'org.kodein.di:kodein-di-framework-android-x:6.3.0' and ...
Read more >how to inject dependency outside activity or fragment in ...
closestKodein only works in Android Context aware classes (such as fragments & activities). To use it outside of these classes, you need an...
Read more >Fragment | Android Developers
Fragment . Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation...
Read more >Fragment Class (Android.App) - Microsoft Learn
A Fragment is a piece of an application's user interface or behavior that can be placed in an Activity.
Read more >AndroidX FragmentFactory and Android Fragments - Medium
Fragments provide core Android app functionality. · Before AndroidX, the developer included a default, no-argument fragment constructor in their custom fragment ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, this is a bug. I will correct this asap
What kind of import do you have for
closestKodein
in your class ?Using the following should work: