From 9a1a7706f83c3e4122f61d5d10f03178ed60a36c Mon Sep 17 00:00:00 2001 From: xueqiushi Date: Wed, 20 Mar 2019 00:12:46 +0800 Subject: [PATCH] Fix https://github.com/KeepSafe/ReLinker/issues/49 Signed-off-by: xueqiushi --- .../src/main/java/com/getkeepsafe/relinker/ReLinker.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/relinker/src/main/java/com/getkeepsafe/relinker/ReLinker.java b/relinker/src/main/java/com/getkeepsafe/relinker/ReLinker.java index 95fa2d2..bac549d 100755 --- a/relinker/src/main/java/com/getkeepsafe/relinker/ReLinker.java +++ b/relinker/src/main/java/com/getkeepsafe/relinker/ReLinker.java @@ -16,6 +16,7 @@ package com.getkeepsafe.relinker; import android.content.Context; +import android.os.Build; import java.io.File; @@ -67,6 +68,10 @@ public static void loadLibrary(final Context context, final String library, final String version, final ReLinker.LoadListener listener) { + if ((Build.VERSION.SDK_INT < Build.VERSION_CODES.M)) { + new ReLinkerInstance().force().loadLibrary(context, library, null, listener); + return; + } new ReLinkerInstance().loadLibrary(context, library, version, listener); }