title: Koin Android: org.koin.error.NoBeanDefFoundException
body: <p>Got that message error</p>
  
  <pre><code>java.lang.RuntimeException: Unable to create application com.app.name.application.MainApplication: org.koin.error.BeanInstanceCreationException: Can't create bean Bean[class=com.app.name.general.preferences.Preferences] due to error :
      org.koin.error.NoBeanDefFoundException: No definition found to resolve type 'android.app.Application'. Check your module definition
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5830)
      at android.app.ActivityThread.-wrap1(Unknown Source:0)
      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673)
      at android.os.Handler.dispatchMessage(Handler.java:105)
      at android.os.Looper.loop(Looper.java:172)
      at android.app.ActivityThread.main(ActivityThread.java:6637)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
   Caused by: org.koin.error.BeanInstanceCreationException: Can't create bean Bean[class=com.app.name.general.preferences.Preferences] due to error :
      org.koin.error.NoBeanDefFoundException: No definition found to resolve type 'android.app.Application'. Check your module definition
      at org.koin.core.instance.InstanceFactory.createInstance(InstanceFactory.kt:63)
      at org.koin.core.instance.InstanceFactory.retrieveInstance(InstanceFactory.kt:26)
      at org.koin.KoinContext$resolveInstance$$inlined$synchronized$lambda$1.invoke(KoinContext.kt:85)
      at org.koin.KoinContext$resolveInstance$$inlined$synchronized$lambda$1.invoke(KoinContext.kt:23)
      at org.koin.ResolutionStack.resolve(ResolutionStack.kt:23)
      at org.koin.KoinContext.resolveInstance(KoinContext.kt:80)
      at com.app.name.constants.EnvironmentConstants$initEnvironmentVariables$$inlined$getKoinInstance$1$1.invoke(KoinComponent.kt:114)
      at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:131)
      at com.app.name.constants.EnvironmentConstants$initEnvironmentVariables$$inlined$getKoinInstance$1.getValue(Unknown Source:7)
      at com.app.name.constants.EnvironmentConstants.initEnvironmentVariables(EnvironmentConstants.kt:180)
      at com.app.name.application.MainApplication.onCreate(MainApplication.kt:59)
      at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5827)
          ... 8 more
  </code></pre>
  
  <p>But all dependencies were correct.</p>
  
  <p>Also I noticed that modules without <code>androidApplication()</code> argument works correctly.</p>
  
  <p>Code looks like:</p>
  
  <pre><code>    startKoin(listOf(
              imageManagerModule,
              databaseRepositoryModule
      ))
  </code></pre>
  
  <p>ImageManager works perfectly</p>
  
  <pre><code>val imageManagerModule: Module = applicationContext {
      bean { ImageManagerImpl() as ImageManager }
  }
  </code></pre>
  
  <p>But Preferences crashes</p>
  
  <pre><code>val preferencesModule: Module = applicationContext {
      bean { PreferencesImpl(androidApplication()) as Preferences }
  }
  </code></pre>