I am trying to configure AspectJ in Android Studio .
But trial and error doesnโt work! Surprisingly, I can make it work with the Eclipse Kepler version
The steps that I followed for Android Studio
- Created Sample
Android Project - File> Preferences> search for
AspectJ in the plugins section 
- Assuming nothing needs to be done in Studio other than configuring build.gradle files
- Added
compile 'org.aspectj:aspectjrt:1.8.1' to the build.gradle file (Module: app) - Created by
Analytics_onBackPressed.aj to detect feedback button - Created by
Analytics_OnClick.aj to detect click events - Created by
Analytics_onCreate.aj for oncreate event detection components - The necessary dependency classes have been created that the
*.aj classes mentioned above will internally call - Added necessary permissions in the manifest
- Starting a project does not detect any of the events (button click, oncreate or back button)
- Following these links are ReferenceLinkOne , ReferenceLinkTwo and ReferenceLinkThree
My question is what is more necessary for AspectJ to work with Android Studio
The steps that were taken in Eclipse and got AspectJ work
- Download version of
Eclipse Kepler - Via Install New Software, select http://download.eclipse.org/tools/ajdt/43/update
- Installed
AspectJ Development Tools (Required) . - An example of an android project has been created
- Created by
Analytics_onBackPressed.aj to detect feedback button - Created by
Analytics_OnClick.aj to detect click events - Created by
Analytics_onCreate.aj for oncreate event detection components - Required permissions added in manifest file
- Right-click in the project and convert the project to AspectJ as follows

- Configured Java build path using the AspectJ runtime library.
- Now when I run the project, I can detect the oncreate components, a back button
Medium used
Android Studio: 2.1.2
JRE: 1.8.0
Windows 7 Enterprise
Any help is much appreciated!
EDIT: 1, the output of AspectJ is not configured correctly
According to this link , I created a jar file from eclipse, including *.aj files and the corresponding dependency. AndroidManifest.xml excluded when creating jar file and jar created
Created a project in Android Studio. Placed this * .jar file in the libs file. (apps> libs) . I turned on AspectJ, waving as shown below.

Now you searched for properties for AspectJ and resolved 
Now starting the project, you need to create the logs that I put in the *.aj files that are in the plugin. Unfortunately, these magazines are not printed in Android Studio magazines.
The form I am completing is AspectJ is not included in this project or there is a configuration error
android android-studio aspectj aspectj-maven-plugin
Stallion
source share