From 9ced80fd9c7046551895b538ede88f78ab88248a Mon Sep 17 00:00:00 2001 From: Mikael Brevik Date: Tue, 27 Oct 2020 09:42:20 +0100 Subject: [PATCH 1/3] fix: Adds relinker for anr/ndk libarary loading on older devices --- android/app/build.gradle | 2 ++ android/app/src/main/java/no/mittatb/MainApplication.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index e62ea9a70d..610053176a 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -227,6 +227,8 @@ dependencies { implementation 'io.intercom.android:intercom-sdk-base:6.+' + implementation 'com.getkeepsafe.relinker:relinker:1.4.1' + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { exclude group:'com.facebook.fbjni' } diff --git a/android/app/src/main/java/no/mittatb/MainApplication.java b/android/app/src/main/java/no/mittatb/MainApplication.java index 4d203f96cb..12138b56f8 100644 --- a/android/app/src/main/java/no/mittatb/MainApplication.java +++ b/android/app/src/main/java/no/mittatb/MainApplication.java @@ -19,6 +19,7 @@ import java.util.List; import io.intercom.android.sdk.Intercom; +import com.getkeepsafe.relinker.ReLinker; public class MainApplication extends MultiDexApplication implements ReactApplication { @@ -69,6 +70,8 @@ private void tryInitializeBugsnag() { if (!TextUtils.isEmpty(bugsnagKey)) { config.setReleaseStage(bugsnagReleaseStage); } + ReLinker.loadLibrary(this, "bugsnag-plugin-android-anr"); + ReLinker.loadLibrary(this, "bugsnag-plugin-android-ndk"); Bugsnag.start(this, config); } } catch (Exception e) { From 1b8339f7e3ebb9df6fb22f600afc0c5419b19d07 Mon Sep 17 00:00:00 2001 From: Mikael Brevik Date: Tue, 27 Oct 2020 10:08:15 +0100 Subject: [PATCH 2/3] changes from relinker to SoLoader which is already loaded --- android/app/build.gradle | 2 -- android/app/src/main/java/no/mittatb/MainApplication.java | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 610053176a..e62ea9a70d 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -227,8 +227,6 @@ dependencies { implementation 'io.intercom.android:intercom-sdk-base:6.+' - implementation 'com.getkeepsafe.relinker:relinker:1.4.1' - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { exclude group:'com.facebook.fbjni' } diff --git a/android/app/src/main/java/no/mittatb/MainApplication.java b/android/app/src/main/java/no/mittatb/MainApplication.java index 12138b56f8..fdb24ccca3 100644 --- a/android/app/src/main/java/no/mittatb/MainApplication.java +++ b/android/app/src/main/java/no/mittatb/MainApplication.java @@ -19,7 +19,6 @@ import java.util.List; import io.intercom.android.sdk.Intercom; -import com.getkeepsafe.relinker.ReLinker; public class MainApplication extends MultiDexApplication implements ReactApplication { @@ -70,8 +69,8 @@ private void tryInitializeBugsnag() { if (!TextUtils.isEmpty(bugsnagKey)) { config.setReleaseStage(bugsnagReleaseStage); } - ReLinker.loadLibrary(this, "bugsnag-plugin-android-anr"); - ReLinker.loadLibrary(this, "bugsnag-plugin-android-ndk"); + SoLoader.loadLibrary("bugsnag-plugin-android-anr"); + SoLoader.loadLibrary("bugsnag-plugin-android-ndk"); Bugsnag.start(this, config); } } catch (Exception e) { From 781b4ac73a4e9191eaa0ddec68ac4771147e725a Mon Sep 17 00:00:00 2001 From: Mikael Brevik Date: Tue, 27 Oct 2020 10:27:01 +0100 Subject: [PATCH 3/3] Upgrades SoLoader manually --- android/app/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index e62ea9a70d..878772d932 100755 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -218,6 +218,8 @@ android { } dependencies { + implementation 'com.facebook.soloader:soloader:0.9.0+' + implementation fileTree(dir: "libs", include: ["*.jar"]) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules