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.42k stars 807 forks source link

onPatchApplied回调接口为null #166

Closed guxiaonian closed 7 years ago

guxiaonian commented 7 years ago

异常类型:补丁未成功修改

手机型号:

手机系统版本:

Robust版本:0.4.5

Gradle版本:如:2.1.3

系统:如:Windows

打印了一下new RobustCallBack()里面的各个方法,发现只走这两个方法,顺序如下

@Override public void logNotify(String log, String where) { Log.i("DBC",log+""); Log.i("DBC",where+""); } @Override public void onPatchApplied(boolean result, Patch patch) { Log.i("CBC",result+""); Log.i("CBC",patch.getUrl()+""); }

返回值为:

I/DBC: changeQuickRedirectField is null, patch info:id = 123,md5 = null I/DBC: class:PatchExecutor method:patch line:147 I/CBC: true I/CBC: null

mivanzhang commented 7 years ago

changeQuickRedirectField is null, 表明apk中没有插入代码,也就是你生成apk的时候Robust没有成功插入代码,请使用release打包,以及注意robust插入代码的包名,在robust.xml文件