Android-AOPExample
Android-AOPExample copied to clipboard
after produce apk,aspectj can not work
In android sutdio,I use assembleRelease prodce apk,but aspectj can not work!!! why?
I got same problem, doesn't seem to work anymore.
The code weave into .class file sometimes can't work in my machine. Who meets the same problem?
@zhoujunqz, Maybe you can check the build.cradle of your main project. In current repo, the app project has been configured as "Skipping non-debuggable build".
java.lang.NoSuchMethodError: No static method aspectOf()
@yxcoding
I didn't get the context. Where do you use the method aspectOf()
?
在Android studio中我使用了这种方式,在debug模式下可以正常工作,在release 构建apk时无法正常工作,能帮忙分析一下问题吗
我后来发现了问题出在什么地方,主要在app module(主工程)的build.gradle文件中对aspectj的配置中, variants.all { variant -> if (!variant.buildType.isDebuggable()) { log.debug("Skipping non-debuggable build type '${variant.buildType.name}'.") // return; } 将return注释掉就可以。