1
我想在我的Kotlin項目中使用Java庫。Kotlin編譯錯誤:未解決的AspectJ超類型
在我的項目庫中定義的類型項目中創建變量可以正常工作,例如, 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編譯器錯誤嗎?難道我做錯了什麼?
我創建了https://youtrack.jetbrains.com/issue/KT-12179,附帶演示項目,它重現了編譯錯誤。 – mfulton26