title: How to fix Kodein Force close error in Android
body: <p><strong>WHY NOT HELP ME ANY PEOPLE???</strong></p>
  
  <p>In my application i used Kotin and <strong>Kodein</strong> for <strong>Dependency injection</strong>.<br>
  I write below codes, but when run application show me Force close error!<br></p>
  
  <p>In my application i used Kotin and <strong>Kodein</strong> for <strong>Dependency injection</strong>.<br>
  I write below codes, but when run application show me Force close error!<br></p>
  
  <p><strong>Application class codes:</strong></p>
  
  <pre><code>class QuoteDiApp : Application(), KodeinAware {
  
      override val kodein = Kodein.lazy {
          bind&lt;Database&gt;() with singleton { DatabaseFakeImpl() }
          bind&lt;QuoteDao&gt;() with singleton { instance&lt;Database&gt;().quoteDao }
          bind&lt;QuoteRepository&gt;() with singleton { QuoteRepositoryImpl(instance()) }
          bind() from provider { QuotesViewModelFactory(instance()) }
      }
  }
  </code></pre>
  
  <p><strong>Activity class codes:</strong></p>
  
  <pre><code>class QuoteDiActivity : AppCompatActivity(), KodeinAware {
  
      override val kodein by closestKodein()
      private val viewModelFactory: QuoteViewModelFactory by instance()
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_quote_di)
  
          initializeUi()
      }
  
      private fun initializeUi() {
          // Use ViewModelProviders class to create / get already created QuotesViewModel
          // for this view (activity)
          val viewModel = ViewModelProviders.of(this, viewModelFactory).get(QuoteViewModel::class.java)
  
          // Observing LiveData from the QuotesViewModel which in turn observes
          // LiveData from the repository, which observes LiveData from the DAO ☺
          viewModel.getQuotes().observe(this, Observer { quotes -&gt;
              val stringBuilder = StringBuilder()
              quotes.forEach { quote -&gt;
                  stringBuilder.append("\n$quote")
              }
              textView_quotes.text = stringBuilder.toString()
          })
  
          // When button is clicked, instantiate a Quote and add it to DB through the ViewModel
          button_add_quote.setOnClickListener {
              val quote = Quote(editText_quote.text.toString(), editText_author.text.toString())
              viewModel.addQuote(quote)
              editText_quote.setText("")
              editText_author.setText("")
          }
      }
  }
  </code></pre>
  
  <p>I initialize <code>application</code> class into <code>Manifest</code></p>
  
  <p><strong>Error message :</strong> </p>
  
  <pre><code> Caused by: org.kodein.di.Kodein$NotFoundException: No binding found for bind&lt;QuoteViewModelFactory&gt;() with ? { ? }
  Registered in this Kodein container:
          bind&lt;QuoteDao&gt;() with singleton { QuoteDao }
          bind&lt;QuotesViewModelFactory&gt;() with provider { QuotesViewModelFactory }
          bind&lt;Database&gt;() with singleton { DatabaseFakeImpl }
          bind&lt;QuoteRepository&gt;() with singleton { QuoteRepositoryImpl }
  
      at org.kodein.di.internal.KodeinContainerImpl.factory(KodeinContainerImpl.kt:174)
      at org.kodein.di.KodeinContainer$DefaultImpls.factory$default(KodeinContainer.kt:33)
      at org.kodein.di.KodeinContainer$DefaultImpls.provider(KodeinContainer.kt:80)
      at org.kodein.di.internal.KodeinContainerImpl.provider(KodeinContainerImpl.kt:7)
      at org.kodein.di.KodeinContainer$DefaultImpls.provider$default(KodeinContainer.kt:79)
      at org.kodein.di.KodeinAwareKt$Instance$1.invoke(KodeinAware.kt:152)
      at org.kodein.di.KodeinProperty$provideDelegate$1.invoke(properties.kt:39)
      at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
      at nouri.mohammad.mvvm_kodeindi.with_di.ui.quotes.QuoteDiActivity.getViewModelFactory(QuoteDiActivity.kt)
      at nouri.mohammad.mvvm_kodeindi.with_di.ui.quotes.QuoteDiActivity.initializeUi(QuoteDiActivity.kt:30)
      at nouri.mohammad.mvvm_kodeindi.with_di.ui.quotes.QuoteDiActivity.onCreate(QuoteDiActivity.kt:24)
      at android.app.Activity.performCreate(Activity.java:5231)
  </code></pre>