Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you help me please ? #96

Open
franck-serot opened this issue Jul 11, 2019 · 2 comments
Open

can you help me please ? #96

franck-serot opened this issue Jul 11, 2019 · 2 comments

Comments

@franck-serot
Copy link

Hi Eduard,
I found your work about aspectj for android studio project.
I created a simple HelloWorld project with the android studio wizard.
Then, I tried to follow your "step by step" described in the section "Usage" on this page https://github.com/Archinamon/android-gradle-aspectj.
I created also the following Java class in order to test with 2 break points :

  • the first on the function "LogAspect.logAroundAllMethods"
  • the second on the function "MainActivity.onCreate"

The program stop on the second break point but not on the first one.
Can you help me to understand and solve this problem?
Thank you in advance for your help.
Best regards,
Franck


package fr.fserot.hellojavaworld.aspectj;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;

@aspect
public class LogAspect {

@Around("execution(* fr.fserot.hellojavaworld.MainActivity.onCreate(*))")
public Object logAroundAllMethods(final ProceedingJoinPoint joinPoint) throws Throwable {
    Object obj = joinPoint.proceed();
    return obj;
}

}

@franck-serot
Copy link
Author

I added some logs in the function "logAroundAllMethods".
I run again my demo and the logs are produced but we can break into the advice.
So, we can close this issue.

@Archinamon
Copy link
Owner

Hello! Try to add log output in aspect class and look, plz, for file app/build/ajc-transform.log — there should be helpful info about what's going on your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants