title: Getting error from creating a Hilt viewModel
body: <p>I've tried to hand over a simple viewModel to a composable and get everytime this error and i don't know what it means:</p>
  <p><code>java.lang.IllegalStateException: Given component holder class com.example.app.MainActivity does not implement interface dagger.hilt.internal.GeneratedComponent or interface dagger.hilt.internal.GeneratedComponentManager</code></p>
  <p>My Gradle:</p>
  <pre class="lang-kotlin prettyprint-override"><code>    implementation(&quot;androidx.hilt:hilt-navigation:1.0.0-beta01&quot;)
      implementation(&quot;androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03&quot;)
  </code></pre>
  <p>I've created a <code>BaseApplication</code> file</p>
  <pre class="lang-kotlin prettyprint-override"><code>import android.app.Application
  import dagger.hilt.android.HiltAndroidApp
  
  @HiltAndroidApp
  class BaseApplication: Application()
  </code></pre>
  <p>and set it in the Manifest.</p>
  <p>I've created an <code>AppModule</code> file:</p>
  <pre class="lang-kotlin prettyprint-override"><code>import android.content.Context
  import com.veloce.montageservice.BaseApplication
  import dagger.Module
  import dagger.Provides
  import dagger.hilt.InstallIn
  import dagger.hilt.android.qualifiers.ApplicationContext
  import dagger.hilt.components.SingletonComponent
  import javax.inject.Singleton
  
  @Module
  @InstallIn(SingletonComponent::class)
  object AppModule {
  
      @Singleton
      @Provides
      fun provideApplication(@ApplicationContext app: Context): BaseApplication {
          return app as BaseApplication
      }
  }
  
  </code></pre>
  <p>Then set the <code>@HiltAndroidApp</code> in my <code>MainActivity</code> and created a <code>viewModel</code> like this:</p>
  <pre class="lang-kotlin prettyprint-override"><code>@HiltViewModel
  class TaskViewModel: ViewModel() {
  
  //code
  
  }
  </code></pre>
  <p>The <code>viewModel</code> is called in my navigation at the <code>MainActivity</code>:</p>
  <pre class="lang-kotlin prettyprint-override"><code> val navController = rememberNavController()
   NavHost(
       navController = navController,
       startDestination = Screens.LoginScreen.route
   ) {
   composable(Screens.ActiveMontageScreen.route) { navBackStackEntry -&gt;
       activeTask?.let {
           val factory =
               HiltViewModelFactory(LocalContext.current, navBackStackEntry)
           val viewModel: TaskViewModel = viewModel(&quot;taskViewModel&quot;, factory)
           ActiveMontageScreen(
               viewModel = viewModel,
               task = it,
               navigation = navController,
               context = LocalContext.current
           ) {
               removeActiveTask()
           }
       }
   }
  }
  
  </code></pre>
  <p>I really cant't see any problems, but I am quite unexperienced with Hilt and Android Development.
  Does anyone know whats the problem?</p>