JakeWharton / hugo

Annotation-triggered method call logging for your debug builds.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After released,aspectj can not work

zhoujunqz opened this issue · comments

it is very strange!In android studio,i run app.It is running normally(Log is printed).
But I use "assembleRelease" to produce apk,then,install to phone.Aspectj can not work(Log is not printed)!!!

it is my code

@aspect
public class DemoAspect {
@pointcut("execution(* *..MainActivity.guaxiaoxi(..))")
public void gua() {
}
@before("gua()")
public void guaxiao(JoinPoint joinPoint) {
Log.e("TAG","success");
}
}

public class MainActivity extends Activity {
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
guaxiaoxi();
}

public void guaxiaoxi(){}
}