I'm writing annotation processor in Kotlin. It works, but I can not import com.sun.tools.javac.code.Attribute
class: Andtoid Strudio shows me it correctly, but during compilation I get Unresolved reference: tools
at import line.
What I need to import?
Now this module imports only kotlin-stdlib
and kotlinpoet
.
You need to add tools.jar from the JDK to the dependencies of your module:
compile files("${System.properties['java.home']}/../lib/tools.jar")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With