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?
0

Please restart the IDE, then copy idea.log file (Help | Show Log) and attach it here.

0
Avatar
Permanently deleted user

Okay, here it is



Attachment(s):
idea.log.zip
0

OK, the plugin seem to work fine.
Is a "Java Class" option available in the New menu?

0
Avatar
Permanently deleted user

Yes.

0

Then it should be related to aspectjrt lib. Please attach an .iml file of a module you're trying to create an aspect in.

0
Avatar
Permanently deleted user

Okay



Attachment(s):
HelloAspectJ2.iml.zip
0

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.

0
Avatar
Permanently deleted user

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.

0

请先登录再写评论。