jasonross / Nuwa

Nuwa, pure java implementation, can hotfix your android application.
2.96k stars 575 forks source link

java.lang.NoClassDefFoundError: cn.jiajixin.nuwa.Hack #51

Closed snzang closed 8 years ago

snzang commented 8 years ago

build成功后,安装到手机上报错:java.lang.NoClassDefFoundError: cn.jiajixin.nuwa.Hack,各位有遇到过吗?

WPCWEG commented 8 years ago

把你到patch.jar删除掉在运行APP

snzang commented 8 years ago

因为我在自定义的MyApplication中初始化了nuwa的代码,而MyApplication的父类BaseApplication会在nuwa初始化前先起来,所以需要使用excludeClass把这些在nuwa初始化之前起来的class全部排除掉。

nuwa{ //包括所有继承Application.class的自定义Application excludeClass = ['BaseApplication.class','MyApplication.class'] }