Closed ardmn closed 8 years ago
Hi!
First of all. You don't need all these options you're trying to use. Please, read their description carefully before enabling any of them. In your case you can remove all options.
I can't say exactly where is your problem. You may have no public methods in your java code. Otherwise declare them or modify the aspect to privileged access. The third point is to investigate through the build/ajc-details.log
file, where you'll find details of AJ-compilation process.
Thank you for advice. I remove all options in build.gradle file for aspectj. Rebuild project. And In ajc-details.log i get :
...many lines like this ...
Join point 'method-execution(void com.example.ui.fragment.TestFragment.testAspectJ())'
in Type 'com.example.ui.fragment.TestFragment' (TestFragment.java:1424)
advised by before advice from 'com.example.aspectj.TestAspectJ' (TestAspectJ.aj:9)
...
[warning] build config error: skipping missing, empty or
corrupt aspectpath entry: C:\StudioProjects\SampleProject\app\src\debug\aspectj
[warning] build config error: skipping missing, empty or
corrupt aspectpath entry: C:\StudioProjects\SampleProject\app\src\customflavor\aspectj
[warning] invalid Class-Path header in manifest
of jar file: C:\StudioProjects\SampleProject\app\libs\Extasys.jar
C:\StudioProjects\SampleProject\app\src\main\aspectj\com\example\aspectj\TestAspectJ.aj:9 [warning] advice defined in
com.example.aspectj.TestAspectJ has not been applied [Xlint:adviceDidNotMatch]
I have source code folders :
aspectj folder with path \src\main\aspectj
How i can edit(set) aspectpath entry ? Or what I do wrang ?
Thanks.
As I see in your logs, joinpoints creates in a right way. So problem may occur within your build-variant config.
invalid Class-Path header in manifest of jar file: C:\StudioProjects\SampleProject\app\libs\Extasys.jar
This error I see first time. You may try to upload your project and share it to me, I'll take a look on it.
@Archinamon Have you some news ?
Yes. I was busy with my main work. Just looked up your proj. Everything goes fine until multidex step. After this dex output doesn't contains any aj-injects. Will investigate this problem on holidays.
Thank you so much :)
I'd made some fix within your problem. Please, try 1.3.2 version :) On my local clone of your project everything works fine.
I'll try it on Monday on a real project and I'll give you feedback
v1.3.2 looks like work fine for me . Thank you :)
Hello. I'm new in AOP and your plugin is the first try to use AspectJ. I do all like in your guide but not see that my aspect work .
I have TestAspectJ.aj file in ...\app\src\main\aspectj\com\example\aspectj :
plugin settings:
In android studio "Android monitor" window I do not see any messages like "testAspectJ hello" when use my andorid app.