BuglyDevTeam / Bugly-Android-Demo

Bugly Android SDK 使用例子
Apache License 2.0
812 stars 307 forks source link

打补丁包失败 FATAL: method 'reversed:L' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$reversed:LL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded. #334

Open SoySauce1024 opened 3 years ago

SoySauce1024 commented 3 years ago

异常类型

编译异常,生成补丁包时报错

Tinker版本

1.19.14.17

bugly 版本

crashreport_upgrade:1.5.23 tinker-support:1.2.3

gradle版本

6.5

AGP 版本

4.1.3

系统

Mac

堆栈/日志

> Task :app:tinkerPatchChinaDebug
-----------------------Tinker patch begin-----------------------
configuration: 
oldApk:/Users/***/Desktop/***/app/bakApk/app-base/china/***-5.8.13.15-debug.apk
newApk:/Users/***/Desktop/***/app/build/outputs/apk/china/debug/***-5.8.13.15-debug.apk
outputFolder:/Users/***/Desktop/***/app/build/tmp/tinkerPatch
isIgnoreWarning:true
isAllowLoaderClassInAnyDex:true
isRemoveLoaderForAllDex:true
isProtectedApp:false
7-ZipPath:/Users/***/.gradle/caches/modules-2/files-2.1/com.tencent.mm/SevenZip/1.1.10/cc390e6c704b74496d9ba0e9b46d2cf8a2a96b84/SevenZip-1.1.10-osx-x86_64.exe
useSignAPk:true
package meta fields: 
dex configs: 
dexMode: jar
dexPattern:assets/secondary-dex-.\.jar
dexPattern:classes.*\.dex
dex loader:com.tencent.tinker.loader.*
dex loader:com.tencent.bugly.beta.tinker.TinkerPatchReflectApplication
lib configs: 
libPattern:lib/.*/.*\.so
resource configs: 
resPattern:resources\.arsc
resPattern:res/.*
resPattern:assets/.*
resPattern:r/.*
resPattern:AndroidManifest\.xml
resIgnore change:assets/.*_meta\.txt
largeModSize:100kb
useApplyResource:true
ArkHot: arkHot / patch.apk

config: arkHot patch.apkassets/arkHot_meta.txt
Analyze old and new apk files1:
old apk1131: ***-5.8.13.15-debug.apk, size=39021130, md5=68b1c8df240a65622713eed69052d7f5
new apk: ***-5.8.13.15-debug.apk, size=39020041, md5=585798f1fd7b109e25db2ee059ab168d

Manifest was changed, while there's no any new components added. Make sure if such changes were all you expected.

UnZipping apk to /Users/***/app/build/tmp/tinkerPatch/***-5.8.13.15-debug-old
UnZipping apk to /Users/****/app/build/tmp/tinkerPatch/****-5.8.13.15-debug-new
Check for loader classes in dex: classes9.dex
Collect class descriptors in classes9.dex
Check for loader classes in dex: classes8.dex
Collect class descriptors in classes8.dex
found modify resource: AndroidManifest.xml, but it is AndroidManifest.xml, just ignore!
Check for loader classes in dex: classes11.dex
Collect class descriptors in classes11.dex
Check for loader classes in dex: classes10.dex
Collect class descriptors in classes10.dex
Check for loader classes in dex: classes12.dex
Collect class descriptors in classes12.dex
Check for loader classes in dex: classes3.dex
Collect class descriptors in classes3.dex
Check for loader classes in dex: classes2.dex
Collect class descriptors in classes2.dex
Check for loader classes in dex: classes13.dex
Collect class descriptors in classes13.dex
Check for loader classes in dex: classes.dex
Collect class descriptors in classes.dex
Check for loader classes in dex: classes6.dex
Collect class descriptors in classes6.dex
Check for loader classes in dex: classes7.dex
Collect class descriptors in classes7.dex
Check for loader classes in dex: classes14.dex
Collect class descriptors in classes14.dex
Check for loader classes in dex: classes5.dex
Collect class descriptors in classes5.dex
Check for loader classes in dex: classes4.dex
loader classes are found in old secondary dex. Found classes: {Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_01;,Lcom/tencent/tinker/loader/shareutil/ShareResPatchInfo;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$V23;,Lcom/tencent/tinker/loader/hotplug/ActivityStubManager;,Lcom/tencent/tinker/loader/shareutil/ShareOatUtil$1;,Lcom/tencent/tinker/loader/shareutil/ShareOatUtil;,Lcom/tencent/tinker/loader/shareutil/SharePatchFileUtil;,Lcom/tencent/tinker/loader/shareutil/ShareFileLockHelper;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_04;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$StreamConsumer$1;,Lcom/tencent/tinker/loader/TinkerDexLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_06;,Lcom/tencent/bugly/beta/tinker/TinkerPatchReflectApplication;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$StreamConsumer;,Lcom/tencent/tinker/loader/hotplug/IncrementComponentManager;,Lcom/tencent/tinker/loader/TinkerResourcesKey;,Lcom/tencent/tinker/loader/AppInfoChangedBlocker$HackerCallback;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_09;,Lcom/tencent/tinker/loader/hotplug/interceptor/ServiceBinderInterceptor;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_07;,Lcom/tencent/tinker/loader/shareutil/ShareIntentUtil;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_00;,Lcom/tencent/tinker/loader/TinkerResourcesKey$V24;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_05;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_01_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_01_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_01_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_07;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_00_T;,Lcom/tencent/tinker/loader/hotplug/handler/MHMessageHandler;,Lcom/tencent/tinker/loader/shareutil/TinkerLogInlineFence;,Lcom/tencent/tinker/loader/shareutil/ShareElfFile$SectionHeader;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$ResultCallback;,Lcom/tencent/tinker/loader/TinkerResourceLoader;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$V19;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_06;,Lcom/tencent/tinker/loader/hotplug/interceptor/ServiceBinderInterceptor$1;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_08;,Lcom/tencent/tinker/loader/hotplug/interceptor/ServiceBinderInterceptor$BinderInvocationHandler;,Lcom/tencent/tinker/loader/shareutil/ShareResPatchInfo$LargeModeInfo;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs;,Lcom/tencent/tinker/loader/hotplug/interceptor/TinkerHackInstrumentation;,Lcom/tencent/tinker/loader/TinkerResourcesKey$V19;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_02;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_09;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_00;,Lcom/tencent/tinker/loader/shareutil/ShareElfFile$1;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_02_T;,Lcom/tencent/tinker/loader/TinkerTestDexLoad;,Lcom/tencent/tinker/loader/shareutil/ShareElfFile$ProgramHeader;,Lcom/tencent/tinker/loader/TinkerSoLoader;,Lcom/tencent/tinker/loader/hotplug/interceptor/HandlerMessageInterceptor$CallbackWrapper;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_01_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_08;,Lcom/tencent/tinker/loader/shareutil/ShareElfFile$ElfHeader;,Lcom/tencent/tinker/loader/TinkerResourcePatcher;,Lcom/tencent/tinker/loader/hotplug/ComponentHotplug;,Lcom/tencent/tinker/loader/shareutil/ShareTinkerInternals;,Lcom/tencent/tinker/loader/shareutil/ShareTinkerLog$1;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_07;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$OptimizeWorker;,Lcom/tencent/tinker/loader/hotplug/interceptor/InterceptFailedException;,Lcom/tencent/tinker/loader/shareutil/ShareTinkerLog$TinkerLogImp;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_01;,Lcom/tencent/tinker/loader/BuildConfig;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_03;,Lcom/tencent/tinker/loader/TinkerLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_01;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$V4;,Lcom/tencent/tinker/loader/hotplug/interceptor/Interceptor$ITinkerHotplugProxy;,Lcom/tencent/tinker/loader/shareutil/ShareSecurityCheck;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_09;,Lcom/tencent/tinker/loader/AppInfoChangedBlocker;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_00;,Lcom/tencent/tinker/loader/hotplug/interceptor/ServiceBinderInterceptor$FakeInterfaceHandler;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_08;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_06;,Lcom/tencent/tinker/loader/TinkerResourcesKey$V17;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_00;,Lcom/tencent/tinker/loader/shareutil/ShareBsDiffPatchInfo;,Lcom/tencent/tinker/loader/hotplug/interceptor/HandlerMessageInterceptor;,Lcom/tencent/tinker/loader/app/TinkerInlineFenceAction;,Lcom/tencent/tinker/loader/shareutil/ShareReflectUtil;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_00_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_00_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_02;,Lcom/tencent/tinker/loader/TinkerClassLoader$CompoundEnumeration;,Lcom/tencent/tinker/loader/TinkerUncaughtHandler;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_02_T;,Lcom/tencent/tinker/loader/TinkerDexOptimizer;,Lcom/tencent/tinker/loader/shareutil/ShareTinkerLog;,Lcom/tencent/tinker/loader/shareutil/ShareArkHotDiffPatchInfo;,Lcom/tencent/tinker/loader/shareutil/ShareConstants;,Lcom/tencent/tinker/loader/TinkerArkHotLoader;,Lcom/tencent/tinker/loader/shareutil/SharePatchInfo;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_09;,Lcom/tencent/tinker/loader/hotplug/handler/PMSInterceptHandler;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$OptimizeWorker$1;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_05;,Lcom/tencent/tinker/loader/TinkerClassLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_03;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_01;,Lcom/tencent/tinker/loader/shareutil/TinkerLogInlineFence$1$1;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$V14;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_03;,Lcom/tencent/tinker/loader/hotplug/IncrementComponentManager$AttrTranslator;,Lcom/tencent/tinker/loader/shareutil/ShareOatUtil$InstructionSet;,Lcom/tencent/tinker/loader/app/TinkerApplication;,Lcom/tencent/tinker/loader/hotplug/interceptor/ServiceBinderInterceptor$FakeClientBinderHandler;,Lcom/tencent/tinker/loader/TinkerDexOptimizer$OptimizeWorker$2;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_02;,Lcom/tencent/tinker/loader/hotplug/UnsupportedEnvironmentException;,Lcom/tencent/tinker/loader/TinkerRuntimeException;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_04;,Lcom/tencent/tinker/loader/hotplug/interceptor/HandlerMessageInterceptor$MessageHandler;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_06;,Lcom/tencent/tinker/loader/TinkerDexLoader$1;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_00_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_02_T;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_04;,Lcom/tencent/tinker/loader/hotplug/IncrementComponentManager$1;,Lcom/tencent/tinker/loader/NewClassLoaderInjector;,Lcom/tencent/tinker/loader/hotplug/EnvConsts;,Lcom/tencent/tinker/loader/hotplug/handler/AMSInterceptHandler;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_05;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_03;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_02;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$ArkHot;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_07;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$STDStub_05;,Lcom/tencent/tinker/loader/AbstractTinkerLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_02_T;,Lcom/tencent/tinker/loader/shareutil/TinkerLogInlineFence$1;,Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;,Lcom/tencent/tinker/loader/TinkerResourcesKey$V7;,Lcom/tencent/tinker/loader/shareutil/ShareDexDiffPatchInfo;,Lcom/tencent/tinker/loader/shareutil/ShareElfFile;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_08;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_04;,Lcom/tencent/tinker/loader/hotplug/interceptor/Interceptor;}
Collect class descriptors in classes4.dex
Check for loader classes in dex: classes15.dex
loader classes are found in old secondary dex. Found classes: {Lcom/tencent/tinker/loader/R;}
Collect class descriptors in classes15.dex
Check if loader classes in classes9.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes8.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes11.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes10.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes12.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes3.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes2.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes13.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes6.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes7.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes14.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes5.dex refer to any classes that is not in loader class patterns.
Check if loader classes in classes4.dex refer to any classes that is not in loader class patterns.
FATAL: method 'reversed:L' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$reversed:LL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to class 'Lj$/util/function/Function;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparing:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to class 'Lj$/util/function/Function;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparing:LLLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparing:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$Function$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$Function$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to class 'Lj$/util/function/ToDoubleFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparingDouble:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToDoubleFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to class 'Lj$/util/function/ToIntFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparingInt:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToIntFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to class 'Lj$/util/function/ToLongFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method '$default$thenComparingLong:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/SystemClassLoaderAdder$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToLongFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'reversed:L' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$reversed:LL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to class 'Lj$/util/function/Function;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparing:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to class 'Lj$/util/function/Function;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparing:LLLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparing:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$Function$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparing:LLL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$Function$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to class 'Lj$/util/function/ToDoubleFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparingDouble:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingDouble:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToDoubleFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to class 'Lj$/util/function/ToIntFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparingInt:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingInt:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToIntFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to class 'Lj$/util/function/ToLongFunction;' which is not loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method '$default$thenComparingLong:LLL' in class 'Lj$/util/Comparator$-CC;' which is not in loader class, this may cause crash when patch is loaded.
FATAL: method 'thenComparingLong:LL' in loader class 'Lcom/tencent/tinker/loader/TinkerDexOptimizer$1;' refers to method 'convert:LL' in class 'Lj$/$r8$wrapper$java$util$function$ToLongFunction$-V-WRP;' which is not in loader class, this may cause crash when patch is loaded.
Check if loader classes in classes15.dex refer to any classes that is not in loader class patterns.

> Task :app:tinkerPatchChinaDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:tinkerPatchChinaDebug'.
> com.tencent.tinker.build.util.TinkerPatchException: There are fatal reasons that cause Tinker interrupt patch generating procedure, see logs above.

tinker-support.gradle 配置

apply plugin: 'com.tencent.bugly.tinker-support'

def bakPath = file("./bakApk/")

def baseApkDir = "app-base/"
def baseApkFileName ="${bakPath}/${baseApkDir}/app-5.8.13.15-debug.apk"
def rFileName = "${bakPath}/${baseApkDir}/app-5.8.13.15-debug-R.txt"
def mappingFileName = ""

tinkerSupport {
    // 开启tinker-support插件,默认值true
    enable = true
    // 指定归档目录,默认值当前module的子目录tinker
    autoBackupApkDir = "${bakPath}"
    // 是否启用覆盖tinkerPatch配置功能,默认值false
    // 开启后tinkerPatch配置不生效,即无需添加tinkerPatch
    overrideTinkerPatchConfiguration = true
    // 编译补丁包时,必需指定基线版本的apk,默认值为空
    // 如果为空,则表示不是进行补丁包的编译
    // @{link tinkerPatch.oldApk }
    baseApk = baseApkFileName
    // 对应tinker插件applyMapping
    baseApkProguardMapping = mappingFileName
    // 对应tinker插件applyResourceMapping
    baseApkResourceMapping = rFileName
    // 构建基准包和补丁包都要指定不同的tinkerId,并且必须保证唯一性
    tinkerId = "base-5.8.13.15"
    // 构建多渠道补丁时使用
    // buildAllFlavorsDir = "${bakPath}/${baseApkDir}"
    // 是否启用加固模式,默认为false.(tinker-spport 1.0.7起支持)
    // isProtectedApp = true
    // 是否开启反射Application模式
    enableProxyApplication = false
    // 是否支持新增非export的Activity(注意:设置为true才能修改AndroidManifest文件)
    supportHotplugComponent = true
}

tinkerPatch {
    //oldApk ="${bakPath}/${appName}/app-release.apk"
    ignoreWarning = true
    useSign = true
    allowLoaderInAnyDex = true
    removeLoaderForAllDex = true
    dex {
        dexMode = "jar"
        pattern = ["classes*.dex"]
        loader = []
    }
    lib {
        pattern = ["lib/*/*.so"]
    }

    res {
        pattern = ["res/*", "r/*", "assets/*", "resources.arsc", "AndroidManifest.xml"]
        ignoreChange = []
        largeModSize = 100
    }

    packageConfig {
    }
    sevenZip {
        zipArtifact = "com.tencent.mm:SevenZip:1.1.10"
    }
    buildConfig {
        keepDexApply = false
    }
}

复现路径

按照 bugly 官方文档配置后,执行 assemleDebug ,生成基准包,然后修改一行代码,修改 tinker_id , 执行 buildTinkerPatchDebug

Lulu0828 commented 3 years ago

请问下解决了吗?我也遇到了同意的问题

SoySauce1024 commented 3 years ago

请问下解决了吗?我也遇到了同意的问题

也不算完全解决,在 Tinker 的 issue https://github.com/Tencent/tinker/issues/1546 里面看到,需要自己改一下 Tinker 里面有一个判断,然后测试目前没发现什么问题