Open yinlingchaoliu opened 4 years ago
方便的话吧gradle的内容也贴出来吧,这样大家可以帮忙分析。 如果按照说明来的,那可能是和其他三方库冲突。
解决方案: aspectjx { //关闭AspectJX功能 enabled true //进行aop处理范围是当前项目包路径 include 'com.company.package' }
org.aspectj.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
at org.aspectj.apache.bcel.classfile.Constant.readConstant(Constant.java:139)
at org.aspectj.apache.bcel.classfile.ConstantPool.
只处理当前包就没有aop的意义了
我这边通过升级 aspectj 版本最新 解决问题
// aspectj implementation 'org.aspectj:aspectjrt:1.9.6'
ABORT org.aspectj.apache.bcel.classfile.ClassFormatException: File: '/Users/chentong/Android/taixin/hetaishop/module-info.class': Invalid byte tag in constant pool: 19 at org.aspectj.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:192) at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:131) at org.aspectj.weaver.bcel.Utility.makeJavaClass(Utility.java:472) at org.aspectj.weaver.bcel.UnwovenClassFile.getJavaClass(UnwovenClassFile.java:68) at org.aspectj.weaver.bcel.BcelWeaver.addClassFile(BcelWeaver.java:453) at org.aspectj.weaver.bcel.BcelWeaver.addJarFile(BcelWeaver.java:400) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:900) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:251) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:187) at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112) at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60) at org.aspectj.tools.ajc.Main.run(Main.java:371) at sun.reflect.GeneratedMethodAccessor921.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:190) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:55) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:135) at com.hujiang.gradle.plugin.android.aspectjx.internal.AJXTask.call(AJXTask.groovy:99) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)