Contents of articles
1、 2. Solutions
Refer to [Android hotfix] to run Tinker’s official example blog;
1、 Error information
In Tinker hotfix, the generated patch package app debug patch_ signed_ 7zip.apk to the root directory,
The following error occurred when trying to hot repair;
2021-04-23 22:52:50.533 22855-22855/tinker.sample.android V/Tinker.SamplePatchListener: receive a patch file: /storage/emulated/0/patch_signed_7zip.apk, file size:0
2021-04-23 22:52:50.536 22855-22855/tinker.sample.android I/Tinker.DefaultLoadReporter: patch loadReporter onLoadPatchListenerReceiveFail: patch receive fail: /storage/emulated/0/patch_signed_7zip.apk, code: -2
2、 Solutions
Pay attention to the patch package loading path, and tinker will automatically load the patch in the root directory_ signed_ 7zip.apk file;
receive a patch file: /storage/emulated/0/patch_signed_7zip.apk, file size:0
Run the tinkerpatchdebug gradle task, and the generated patch package name is app debug patch_ signed_ 7zip.apk ,
Blind lead, wasted dozens of minutes, looking for errors;
Add the app debug patch_ signed_ 7zip.apk renamed patch_ signed_ 7zip.apk, and then copy it to the root directory of mobile phone SD card;