Tag: 互操作性

Kotlin编译错误:未解决的AspectJ超types

我正在尝试在我的Kotlin项目中使用Java库。 在我的项目库中定义的types创建variables工作正常,例如val foo: Foo = fooProvider.get() ,但引入实际使用这些types的代码,例如foo.toString()会导致编译错误: 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 从我迄今为止发现的例子中, Footypesimplements了一个AspectJ接口types的ajcMightHaveAspect 。 aspectjrt是在我的类路径,但我找不到在任何地方定义的ajcMightHaveAspect 。 这是一个Kotlin编译器错误? 难道我做错了什么?