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

after produce apk,aspectj can not work #3

Open
zhoujunqz opened this issue Dec 12, 2016 · 6 comments
Open

after produce apk,aspectj can not work #3

zhoujunqz opened this issue Dec 12, 2016 · 6 comments

Comments

@zhoujunqz
Copy link

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

@cooperkong
Copy link

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

@Master-Neo
Copy link

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

@rayworks
Copy link

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

@yxdroid
Copy link

yxdroid commented Jun 1, 2017

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

@rayworks
Copy link

rayworks commented Jun 1, 2017

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

@cike
Copy link

cike commented Jun 30, 2018

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

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

6 participants