Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.17k stars 3.34k forks source link

执行buildTinkerPatchRelease打补丁异常,tinker的代码都在classes2.dex中,尝试过multiDexKeepProguard和multiDexKeepFile都不起作用。 #1055

Open ghost opened 5 years ago

ghost commented 5 years ago

执行buildTinkerPatchRelease打补丁异常,tinker的代码都在classes2.dex中,尝试过multiDexKeepProguard和multiDexKeepFile都不起作用。

异常类型:java.lang.RuntimeException: com.tencent.tinker.build.util.TinkerPatchException: loader classes are found in old secondary dex.

tinker版本:如:1.9.11

gradle版本:com.android.tools.build:gradle:3.0.1

是否使用热更新SDK: Bugly SDK

系统:Mac

堆栈/日志:


configuration: 
oldApk:/Users/liuyong/Documents/CreditEase/workspace/creditease_android/app/build/bakApk/app-0329-14-47-01/app-release.apk
newApk:/Users/liuyong/Documents/CreditEase/workspace/creditease_android/app/build/outputs/apk/release/app-release.apk
outputFolder:/Users/liuyong/Documents/CreditEase/workspace/creditease_android/app/build/outputs/apk/tinkerPatch/release
isIgnoreWarning:false
isProtectedApp:false
7-ZipPath:/Users/liuyong/.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:classes.*\.dex
dexPattern:assets/secondary-dex-.\.jar
dex loader:com.tencent.tinker.loader.*
dex loader:com.tencent.bugly.beta.tinker.TinkerPatchReflectApplication
lib configs: 
libPattern:lib/.*/.*\.so
resource configs: 
resPattern:AndroidManifest\.xml
resPattern:res/.*
resPattern:resources\.arsc
resPattern:r/.*
resPattern:assets/.*
resIgnore change:assets/.*_meta\.txt
largeModSize:100kb
useApplyResource:true

Analyze old and new apk files:
old apk: app-release.apk, size=47721554, md5=6acd60401b045f995cbc3fca9cebb2ee
new apk: app-release.apk, size=47721568, md5=3765c9bac55c0277aa03291cd2c6181d

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

UnZipping apk to /Users/liuyong/Documents/CreditEase/workspace/creditease_android/app/build/outputs/apk/tinkerPatch/release/app-release-old
UnZipping apk to /Users/liuyong/Documents/CreditEase/workspace/creditease_android/app/build/outputs/apk/tinkerPatch/release/app-release-new
found modify resource: AndroidManifest.xml, but it is AndroidManifest.xml, just ignore!
Check for loader classes in dex: classes2.dex
Warning:ignoreWarning is false, but we found 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/AndroidNClassLoader;,Lcom/tencent/tinker/loader/TinkerResourcesKey;,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/TinkerTestAndroidNClassLoader;,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/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/shareutil/ShareTinkerInternals;,Lcom/tencent/tinker/loader/hotplug/ComponentHotplug;,Lcom/tencent/tinker/loader/R;,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/hotplug/ActivityStubs$SGTStub_01;,Lcom/tencent/tinker/loader/BuildConfig;,Lcom/tencent/tinker/loader/TinkerLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_03;,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/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/hotplug/interceptor/HandlerMessageInterceptor;,Lcom/tencent/tinker/loader/shareutil/ShareBsDiffPatchInfo;,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/TinkerUncaughtHandler;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_02_T;,Lcom/tencent/tinker/loader/TinkerDexOptimizer;,Lcom/tencent/tinker/loader/shareutil/ShareConstants;,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/hotplug/ActivityStubs$SIStub_05;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_03;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_01;,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/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/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/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/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;}
java.lang.RuntimeException: com.tencent.tinker.build.util.TinkerPatchException: 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/AndroidNClassLoader;,Lcom/tencent/tinker/loader/TinkerResourcesKey;,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/TinkerTestAndroidNClassLoader;,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/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/shareutil/ShareTinkerInternals;,Lcom/tencent/tinker/loader/hotplug/ComponentHotplug;,Lcom/tencent/tinker/loader/R;,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/hotplug/ActivityStubs$SGTStub_01;,Lcom/tencent/tinker/loader/BuildConfig;,Lcom/tencent/tinker/loader/TinkerLoader;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_03;,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/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/hotplug/interceptor/HandlerMessageInterceptor;,Lcom/tencent/tinker/loader/shareutil/ShareBsDiffPatchInfo;,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/TinkerUncaughtHandler;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SIStub_02_T;,Lcom/tencent/tinker/loader/TinkerDexOptimizer;,Lcom/tencent/tinker/loader/shareutil/ShareConstants;,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/hotplug/ActivityStubs$SIStub_05;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTStub_03;,Lcom/tencent/tinker/loader/hotplug/ActivityStubs$SGTKStub_01;,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/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/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/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/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;}
    at com.tencent.tinker.build.decoder.ApkDecoder$ApkFilesVisitor.visitFile(ApkDecoder.java:179)
    at com.tencent.tinker.build.decoder.ApkDecoder$ApkFilesVisitor.visitFile(ApkDecoder.java:138)
    at java.nio.file.Files.walkFileTree(Files.java:2670)
    at java.nio.file.Files.walkFileTree(Files.java:2742)
    at com.tencent.tinker.build.decoder.ApkDecoder.patch(ApkDecoder.java:113)
    at com.tencent.tinker.build.patch.Runner.tinkerPatch(Runner.java:65)
    at com.tencent.tinker.build.patch.Runner.run(Runner.java:48)
    at com.tencent.tinker.build.patch.Runner.gradleRun(Runner.java:41)
    at com.tencent.tinker.build.patch.Runner$gradleRun.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at com.tencent.tinker.build.gradle.task.TinkerPatchSchemaTask.tinkerPatch(TinkerPatchSchemaTask.groovy:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
    at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:768)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
    at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
    at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
    at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
    at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
    at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
16:22:40: Task execution finished 'buildTinkerPatchRelease'.```
TanJunYi commented 5 years ago

我用1.9.9添加multiDexKeep.txt就可以了https://blog.csdn.net/qq_29870299/article/details/84194002解决方法

jswhzp commented 5 years ago

minSDkVersion 21以上 keep文件就没用,不能指定类到主DEX,改为19就好,但是我公司项目已经升到21了,现在不能改为19,很蛋疼。希望官方大佬来解答下怎么弄,纠结一个礼拜了;

TanJunYi commented 5 years ago

我也是21版本以上,暂时没什么问题!

------------------ 原始邮件 ------------------ 发件人: "jswhzp"notifications@github.com; 发送时间: 2019年4月27日(星期六) 下午2:33 收件人: "Tencent/tinker"tinker@noreply.github.com; 抄送: "传说"875356861@qq.com; "Comment"comment@noreply.github.com; 主题: Re: [Tencent/tinker] 执行buildTinkerPatchRelease打补丁异常,tinker的代码都在classes2.dex中,尝试过multiDexKeepProguard和multiDexKeepFile都不起作用。 (#1055)

minSDkVersion 21以上 keep文件就没用,不能指定类到主DEX,改为19就好,但是我公司项目已经升到21了,现在不能改为19,很蛋疼。希望官方大佬来解答下怎么弄,纠结一个礼拜了;

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

NMNET commented 5 years ago

我们也遇到这个问题,导致无法上线热修复功能。 项目配置为: 异常类型:java.lang.RuntimeException: com.tencent.tinker.build.util.TinkerPatchException: loader classes are found in old secondary dex. tinker版本:1.9.13 gradle版本:4.10.1
com.android.tools.build:gradle : 3.3.2 是否使用热更新SDK: Bugly SDK 系统:Mac

希望tinker官方能尽快解决这个问题