diff --git a/ReactNativeClient/android/app/src/main/java/net/cozic/joplin/MainApplication.java b/ReactNativeClient/android/app/src/main/java/net/cozic/joplin/MainApplication.java index 47f23b65a..d04e8c8d3 100644 --- a/ReactNativeClient/android/app/src/main/java/net/cozic/joplin/MainApplication.java +++ b/ReactNativeClient/android/app/src/main/java/net/cozic/joplin/MainApplication.java @@ -68,6 +68,20 @@ public class MainApplication extends Application implements ReactApplication { @Override public void onCreate() { super.onCreate(); + + // To try to fix the error "Row too big to fit into CursorWindow" + // https://github.com/andpor/react-native-sqlite-storage/issues/364#issuecomment-526423153 + // https://github.com/laurent22/joplin/issues/1767#issuecomment-515617991 + try { + Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize"); + field.setAccessible(true); + field.set(null, 50 * 1024 * 1024); // 50 MB + } catch (Exception e) { + if (DEBUG_MODE) { + e.printStackTrace(); + } + } + SoLoader.init(this, /* native exopackage */ false); } }