反应原生Android 64位升级问题

时间:2019-08-13 09:44:30

标签: android react-native google-play react-native-android

我上传了build.gradle以满足64位推荐,现在我使用的是0.57.5版本(因为此应用非常大,并且正在去年开发中)。

defaultConfig {
        applicationId "xxxxxx"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        renderscriptTargetApi 27
        renderscriptSupportModeEnabled true
        versionCode 11
        versionName "1.6"
        multiDexEnabled = true
        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'
        }
    }
applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            def versionCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }

        }
    }

64位手机在启动后一直崩溃。没有升级react-native版本我可以做什么?如果我必须升级,那么什么版本现在稳定,什么是最安全的方法?

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.hashtagaboutme.pjcujob/lib-main/libgnustl_shared.so" is 32-bit instead of 64-bit

1 个答案:

答案 0 :(得分:2)