Meituan-Dianping / Robust

Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Apache License 2.0
4.43k stars 809 forks source link

没有新增类的情况下,打热修包正常。 在新加类的时候再打热修复包报错。 #395

Open kukulong123 opened 4 years ago

kukulong123 commented 4 years ago

没有新增类的情况下,打热修包正常。 在新加类的时候再打热修复包报错,手动执行了下dx命令 ,报下面的错,看了下dex.jar 用的是java1.7 我自己用新版的dex.jar这个命令就成功了。但是,自动打包的时候robust文件夹下的dex.jar,自动给换成1.7的,所以没办法生成热修包,帮忙看下,多谢啦

\app\robust\dx.jar --dex --output=classes.dex meituan.jar

UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000) at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:472) at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) at com.android.dx.command.dexer.Main.processClass(Main.java:704) at com.android.dx.command.dexer.Main.processFileBytes(Main.java:673) at com.android.dx.command.dexer.Main.access$300(Main.java:82) at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:602) at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284) at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166) at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144) at com.android.dx.command.dexer.Main.processOne(Main.java:632) at com.android.dx.command.dexer.Main.processAllFiles(Main.java:510) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:279) at com.android.dx.command.dexer.Main.run(Main.java:245) at com.android.dx.command.dexer.Main.main(Main.java:214) at com.android.dx.command.Main.main(Main.java:106) ...while parsing com/xdf/upoc/teacher/ui/work/OnClickItem.class

ppxpp commented 4 years ago

更新自动补丁插件工程内的dex.jar,重新出一个插件包就可以