Android-AOPExample icon indicating copy to clipboard operation
Android-AOPExample copied to clipboard

after produce apk,aspectj can not work

Open zhoujunqz opened this issue 7 years ago • 6 comments

In android sutdio,I use assembleRelease prodce apk,but aspectj can not work!!! why?

zhoujunqz avatar Dec 12 '16 04:12 zhoujunqz

I got same problem, doesn't seem to work anymore.

cooperkong avatar Feb 07 '17 22:02 cooperkong

The code weave into .class file sometimes can't work in my machine. Who meets the same problem?

Master-Neo avatar Feb 08 '17 09:02 Master-Neo

@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".

rayworks avatar Feb 25 '17 05:02 rayworks

java.lang.NoSuchMethodError: No static method aspectOf()

yxdroid avatar Jun 01 '17 03:06 yxdroid

@yxcoding I didn't get the context. Where do you use the method aspectOf() ?

rayworks avatar Jun 01 '17 15:06 rayworks

在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注释掉就可以。

cike avatar Jun 30 '18 11:06 cike