React Native update version in existing app

114
August 11, 2019, at 10:40 PM

I have very large app on play store with very complicated code on React Native and Android. Most android library code is customized as per requirement in this app. Now I want to update my app on play store but for that I need to make my app compatible with 64 bit as Google Play is not accepting my app as per new policies.

I googled it and find that I need to update React Native version to 0.59.0. I just changed React Native version in my package.json file from 0.57.7 to 0.59.8. and added below piece of code in my app level build.gradle file:

ndk {
            abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

But here after adding above code when I run app its being crash on start with below error message:

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libreactnativejni.so caused by: couldn't find DSO to load: libglog_init.so caused by: couldn't find DSO to load: libglog.so caused by: couldn't find DSO to load: libgnustl_shared.so caused by: dlopen failed: "/data/data/com.m_naira/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:703)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:564)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:500)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
        at com.facebook.react.bridge.ReactBridge.staticInit(ReactBridge.java:18)
        at com.facebook.react.bridge.NativeMap.<clinit>(NativeMap.java:19)
        at com.facebook.react.bridge.JSCJavaScriptExecutorFactory.create(JSCJavaScriptExecutorFactory.java:21)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:917)
        at java.lang.Thread.run(Thread.java:764)

Here is a piece of code from my package.json:

"dependencies": {
    "axios": "^0.18.0",
    "moment": "^2.22.2",
    "react": "16.6.3",
    "react-image-mapper": "0.0.14",
    "react-native": "^0.59.8",
    "react-native-animatable": "^1.3.0",
    "react-native-autocomplete-input": "^3.6.0",
    "react-native-camera": "^1.9.2",
    "react-native-contacts": "^2.2.4",
    "react-native-customized-image-picker": "^0.1.4",
    "react-native-datepicker-dialog": "0.0.9",
}

I don't know how to go with react native update process as it is harmful for existing app. Please let me know what is the feasible solution for this. Any help will be appreciated.

Answer 1

The upgrade of the version does not seem to be working properly. This error is 64 bits unsupported.

Did you remove package-lock.json and yarn-lock.json ? And

Did you run npm install --save react-native@0.59.8 or yarn add react-native@0.59.8

and react-native upgrade

Please refer to this link.

READ ALSO
Fragments aren&#180;t added to backstack when using Navigation UI with Navigation Drawer

Fragments aren´t added to backstack when using Navigation UI with Navigation Drawer

I´m using the Android Navigation Component to create an App with a Navigation DrawerHowever if if change the current Fragment via the Navigation Drawer and then press back the app always returns to the start Fragment of the Navigation Graph

99
How do i draw these kinds custom shape?

How do i draw these kinds custom shape?

I have the following design and need to make without using png file if possibleI have done this with the help of png file but i am thinking if there is any other way which is performance centric

115
fetch only 10 data from server user scroll fetch another 10 data

fetch only 10 data from server user scroll fetch another 10 data

I tried to fetch only 10 data from server and after user scrolling next 10 data load (fetch) from server and show to usernot all data fetch at same time

140