在现有应用程序中反应本机更新版本

时间:2019-08-10 15:38:34

标签: android react-native 64-bit updates google-play-console

我在游戏商店中有一个非常大的应用程序,在React Native和Android上有非常复杂的代码。大多数android库代码是根据此应用程序中的要求自定义的。现在,我想在Play商店上更新我的应用程序,但是为此,我需要使我的应用程序与64位兼容,因为Google Play根据新政策不接受我的应用程序。

我用Google搜索它,发现我需要将React Native版本更新为0.59.0。我刚刚将package.json文件中的React Native版本从0.57.7更改为0.59.8。并在我的应用程序级别的build.gradle文件中添加了以下代码:

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"
        }
    }

但是在添加上面的代码后,当我运行应用程序时,它在出现以下错误消息时崩溃:

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)

这是我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",
}

我不知道如何进行本机更新过程,因为这对现有应用程序有害。请让我知道什么是可行的解决方案。 任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

为此,最好使用rn-diff-purge将react-native版本更新为最新版本,这是最佳选择,根据您现有的react-native版本,有一个表单击最新版本。然后,您更新库并处理不推荐使用的东西

相关问题