Anyone using Kotlin with MultiModule Android Proje...
# android
d
Anyone using Kotlin with MultiModule Android Project? Give me not existent class error for classes that are in other module
g
We use. And a lot of other developers do without problem.
Do you use
implementation
configuration for dependencies?
d
Yes I do the same
Still when I rebuild it give me same error. If I move everything back to app module, it compile fine
Copy code
Error:(25, 2) error: [dagger.android.AndroidInjector.inject(T)] error.NonExistentClass is bound multiple times:
  public interface PokemonActivitySubcomponent extends AndroidInjector<PokemonActivity> {
         ^
      @org.jetbrains.annotations.NotNull @Provides error.NonExistentClass in.co.kshitijjain.pokemonkotlin.pokemon.PokemonActivityModule.pokemonConverter()
      @org.jetbrains.annotations.NotNull @Provides error.NonExistentClass in.co.kshitijjain.pokemonkotlin.pokemon.PokemonActivityModule.pokemonFetcher(retrofit2.Retrofit, com.squareup.moshi.Moshi, error.NonExistentClass)
g
Ha? This is annotation processor error
Are you sure that your module contains dagger and kapt?
Also implementation make dependency not transient, so check that you have this dependency on your app module or replace
implementation
with
api
d
Well I made a really silly mistake
When I created new module, in its gradle file I haven’t applied kotlin using
Copy code
apply plugin: 'kotlin'
That was the main issue
r
Iam
Are you using a AndroidInjector in a feature module?