title: Koin 2.2.1 : I cannot use "by viewModel" in Activity
body: <p><strong>Cannot use &quot;by viewModel&quot; from Activity</strong></p>
  <p>I want to inject a ViewModel for an Activity, so I tried this. But it was failed, Android Studio cannot find reference of it.</p>
  <pre><code>private val mainViewModel: MainViewModel by viewModel()
  </code></pre>
  <p>My activity extends <code>AppCompatActivity</code>, and gradle dependencies includes these libraries:</p>
  <pre><code>implementation 'androidx.core:core-ktx:1.3.2'
  def koin_version = '2.2.1'
  implementation &quot;org.koin:koin-android:$koin_version&quot;
  implementation &quot;org.koin:koin-androidx-scope:$koin_version&quot;
  implementation &quot;org.koin:koin-androidx-viewmodel:$koin_version&quot;
  implementation &quot;org.koin:koin-androidx-fragment:$koin_version&quot;
  implementation &quot;androidx.lifecycle:lifecycle-viewmodel-savedstate:$koin_version&quot;
  </code></pre>
  <p><strong>What I tried:</strong></p>
  <p>The code below is working, but I want to use new default &quot;SavedStateHandle&quot; feature of Koin 2.2.0.</p>
  <pre><code>private val mainViewModel: MainViewModel by inject()
  </code></pre>
  <p>I found this code was already included, Android Studio cannot find it.</p>
  <p>ActivityExt.kt:</p>
  <pre><code>inline fun &lt;reified T : ViewModel&gt; ComponentActivity.viewModel(
          qualifier: Qualifier? = null,
          noinline state: BundleDefinition? = null,
          noinline owner: ViewModelOwnerDefinition = { from(this, this) },
          noinline parameters: ParametersDefinition? = null,
  ): Lazy&lt;T&gt; {
      return lazy(LazyThreadSafetyMode.NONE) {
          getViewModel(qualifier, state, owner, parameters)
      }
  }
  </code></pre>
  <p>In Fragment, both <code>viewModel</code> and <code>sharedViewModel</code> works fine.</p>
  <pre><code>private val viewModel by viewModel&lt;SearchViewModel&gt;()
  private val mainViewModel by sharedViewModel&lt;MainViewModel&gt;()
  </code></pre>
  <p><strong>Question:</strong>
  What is the best way to inject ViewModel in Activity with Koin 2.2.0+ version?</p>