T-MVP icon indicating copy to clipboard operation
T-MVP copied to clipboard

去掉realm的配置后,运行不正常

Open FlyingWater1 opened this issue 6 years ago • 0 comments

在我写的工程里面,如果不配置realm,就会报错 Caused by: javassist.NotFoundException: compileDebugJavaWithJavac.classes.com.base.event.Event at com.app.plugin.MyInject$_injectDir_closure1.doCall(MyInject.groovy:32)

     报错原因是MyInject的32行:CtClass c = pool.getCtClass(className)

    MyInject的24行:String filePath = file.absolutePath
如果配置上realm, MyInject的24行获取到的路径是工程下的app/build/intermediates/transforms...下面的内容,
    如果不进行realm配置,获取到的路径就是工程下的app/build/intermediates/javac/debug/compileDebugJavaWithJavac......下面的内容,然后又以com进行截取字符串,就会出错,

请教下怎么解决

FlyingWater1 avatar Feb 21 '19 08:02 FlyingWater1