我试图在我的Kotlin项目中使用Java库。
在库中定义的类型项目中创建变量工作正常,例如val foo: Foo = fooProvider.get()
,但引入了实际使用这些类型的代码,例如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
从目前为止我发现的示例Foo
类型implements
ajcMightHaveAspect
这是某种类型的AspectJ接口。
aspectjrt
在我的类路径中,但我无法在任何地方找到ajcMightHaveAspect
。
这是Kotlin编译器错误吗?我做错了吗?
答案 0 :(得分:0)