AspectJ: Cannot create new aspect
I am trying to use AspectJ in an Android app. I enabled AspectJ support from the plugins menu, added aspectjrt.jar as a dependency, and restarted the IDE. However, I am not seeing "Aspect" as an option from the "New" menu. How can I add an aspect to my project?
Please sign in to leave a comment.
Please restart the IDE, then copy idea.log file (Help | Show Log) and attach it here.
Okay, here it is
Attachment(s):
idea.log.zip
OK, the plugin seem to work fine.
Is a "Java Class" option available in the New menu?
Yes.
Then it should be related to aspectjrt lib. Please attach an .iml file of a module you're trying to create an aspect in.
Okay
Attachment(s):
HelloAspectJ2.iml.zip
Oh, you probably downloaded this .jar and attached it as-is. But it is not a library, rather an installer. You need to extract aspectjrt.jar from it - either via executing the installer, or using any unarchiver.
Thank you. I found the references to the "installer" in the documentation very confusing, but that makes sense. I will get to try it sometime after the holidays.