I'm trying to use a Java library in my Kotlin project.
Creating variables in my project of types defined in the library works fine, e.g. val foo: Foo = fooProvider.get()
, but introducing code that actually uses these types, e.g. foo.toString()
, causes a compilation error:
Error:Kotlin: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class com.example.Foo, unresolved supertypes: ajcMightHaveAspect
From what I have found so far my example Foo
type implements
ajcMightHaveAspect
which is some type of AspectJ interface.
aspectjrt
is on my classpath but I cannot find ajcMightHaveAspect
defined anywhere.
Is this a Kotlin compiler bug? Am I doing something wrong?