https://kotlinlang.org logo
#android
Title
# android
d

devKshitijJain

02/25/2018, 12:22 PM
Anyone using Kotlin with MultiModule Android Project? Give me not existent class error for classes that are in other module
g

gildor

02/25/2018, 12:23 PM
We use. And a lot of other developers do without problem.
Do you use
implementation
configuration for dependencies?
d

devKshitijJain

02/25/2018, 12:24 PM
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

gildor

02/25/2018, 1:29 PM
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

devKshitijJain

02/25/2018, 2:17 PM
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

rkeazor

02/25/2018, 2:19 PM
Iam
Are you using a AndroidInjector in a feature module?
26 Views