Tinker:https://github.com/Tencent/tinker
minsdk <=21、 targetsdk 33、 android gradle plugin 7.4.2、 Gradle 7.5.1、 R8 4.0.71
configField("TINKER_ID", ""tinker_id_${getTinkerIdValue()}"") // tinkerId 可以设为项目的versionName作为基准,有一个小细节是必须以**tinker_id_**开头,不然会报错
configField("NEW_TINKER_ID", ""${releaseTime()}"") // new tinkerId 可以设为项目的打包时间,不断更新
adb push “patch文件的路径” /storage/emulated/0/Android/data/包名/files/
//patch listener error code
public static final int ERROR_PATCH_OK = 0;
public static final int ERROR_PATCH_DISABLE = -1;
public static final int ERROR_PATCH_NOTEXIST = -2;
public static final int ERROR_PATCH_RUNNING = -3;
public static final int ERROR_PATCH_INSERVICE = -4;
public static final int ERROR_PATCH_JIT = -5;
public static final int ERROR_PATCH_ALREADY_APPLY = -6;