error: supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath

后端 未结 15 1155
误落风尘
误落风尘 2020-12-05 22:31

I can\'t compile my Android Kotlin project.

I have no idea what is this...

Gradle log:

error: supertypes of the following classes ca

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 23:18

    In my case I had a library module with an abstract application class implementing Dagger's HasActivityInjector and an application module with a dependency to the library and its own (non-abstract) application class extending the base app class.

    My Gradle dependencies were implementations, and therefore not accessible to the application module's application class (even though there were no imports there, otherwise the issue would be immediately obvious as you'd get a 'could not resolve' error. The fix was to replace dagger implementation dependencies with api, that makes them available to dependant modules as well.

提交回复
热议问题