Skip to content

Commit e4b56a3

Browse files
committed
1. [hotfix] fix dex check error in some case
1 parent ac84abb commit e4b56a3

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Tinker
22
[![license](http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat)](https://github.com/Tencent/tinker/blob/master/LICENSE)
3-
[![Release Version](https://img.shields.io/badge/release-1.7.2-red.svg)](https://github.com/Tencent/tinker/releases)
3+
[![Release Version](https://img.shields.io/badge/release-1.7.3-red.svg)](https://github.com/Tencent/tinker/releases)
44
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Tencent/tinker/pulls)
55
[![WeChat Approved](https://img.shields.io/badge/Wechat_Approved-1.6.2-red.svg)](https://github.com/Tencent/tinker/wiki)
66

@@ -14,7 +14,7 @@ Add tinker-gradle-plugin as a dependency in your main `build.gradle` in the root
1414
```gradle
1515
buildscript {
1616
dependencies {
17-
classpath ('com.tencent.tinker:tinker-patch-gradle-plugin:1.7.2')
17+
classpath ('com.tencent.tinker:tinker-patch-gradle-plugin:1.7.3')
1818
}
1919
}
2020
```
@@ -24,9 +24,9 @@ Then you need to "apply" the plugin and add dependencies by adding the following
2424
```gradle
2525
dependencies {
2626
//optional, help to generate the final application
27-
provided('com.tencent.tinker:tinker-android-anno:1.7.2')
27+
provided('com.tencent.tinker:tinker-android-anno:1.7.3')
2828
//tinker's main Android lib
29-
compile('com.tencent.tinker:tinker-android-lib:1.7.2')
29+
compile('com.tencent.tinker:tinker-android-lib:1.7.3')
3030
}
3131
...
3232
...

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19-
VERSION_NAME_PREFIX=1.7.2
19+
VERSION_NAME_PREFIX=1.7.3
2020
VERSION_NAME_SUFFIX=

tinker-android/tinker-android-lib/src/main/java/com/tencent/tinker/lib/patch/DexDiffPatchInternal.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ private static boolean extractDexDiffInternals(Context context, String dir, Stri
182182
String dexDiffMd5 = info.dexDiffMd5;
183183
String oldDexCrc = info.oldDexCrC;
184184

185+
if (dexDiffMd5.equals("0") && !ShareTinkerInternals.isVmArt()) {
186+
TinkerLog.w(TAG, "patch dex %s is only for art, just continue", patchRealPath);
187+
continue;
188+
}
185189
String extractedFileMd5 = ShareTinkerInternals.isVmArt() ? info.destMd5InArt : info.destMd5InDvm;
186190

187191
if (!SharePatchFileUtil.checkIfMd5Valid(extractedFileMd5)) {
@@ -411,7 +415,7 @@ private static boolean extractDexToJar(ZipFile zipFile, ZipEntry entryFile, File
411415
private static void checkVmArtProperty() {
412416
boolean art = ShareTinkerInternals.isVmArt();
413417
if (!art && Build.VERSION.SDK_INT >= 21) {
414-
throw new TinkerRuntimeException("it is dalvik vm, but sdk version " + Build.VERSION.SDK_INT + " is larger than 21");
418+
throw new TinkerRuntimeException("it is dalvik vm, but sdk version " + Build.VERSION.SDK_INT + " is larger than 21!");
415419
}
416420
}
417421

tinker-sample-android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919

20-
TINKER_VERSION=1.7.2
20+
TINKER_VERSION=1.7.3

0 commit comments

Comments
 (0)