反应原生的Android应用程序(通过谷歌Play商店的生产)工作的一个移动碰撞,但在另一台移动

问题描述 投票:5回答:1

我已经使用了原生做出反应(不博览会)开发Android手机应用程序。我测试的仿真器(Android和iOS),它是工作的罚款。然后我就发布到Google Play。我测试了3个设备:1)一加一 - 做工精细2)三星S8 - 崩溃3)三星S7 - 崩溃

我发现它为什么崩溃的原因。而1 + 1是通过谷歌Play上安装的应用程序,armeabi-V7A-release.apk三星正在加快APP-arm64-V8A-release.apk。如果我手动下载三星手机上的应用程序,armeabi-V7A-release.apk(而不是通过谷歌游戏),那么应用程序工作正常。一些问题:

1)是三星应该下载什么是下载(APP-arm64-V8A-release.apk)? 2)如果是(我认为这是正确的),那么可能是什么问题?我怎么能调试生产应用程序。

注:应用程序崩溃,如果我手动1 + 1和三星手机安装APK普遍。

这是我的gradele.build文件

def enableSeparateBuildPerCPUArchitecture = true

def enableProguardInReleaseBuilds = true

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.bakbakapp.bakbak"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 3
        versionName "3.0"
    }
    signingConfigs {
        release {
            if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
                storeFile file(MYAPP_RELEASE_STORE_FILE)
                storePassword MYAPP_RELEASE_STORE_PASSWORD
                keyAlias MYAPP_RELEASE_KEY_ALIAS
                keyPassword MYAPP_RELEASE_KEY_PASSWORD
            }
        }
    }
    splits {
        abi {
            def isReleaseBuild = false

            gradle.startParameter.taskNames.find {
                if (it ==~ /:app:assemble.*Release/) {
                    isReleaseBuild = true
                    return true // break
                }
                return false // continue
            }
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk true  // If true, also generate a universal APK
            include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            shrinkResources true
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // Map for the version code that gives each ABI a value.
    def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4]

    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) { 
                output.versionCodeOverride = abiCodes.get(abi, 0) * 1048576 + defaultConfig.versionCode

            }
        }
    }
}
android react-native
1个回答
1
投票

作为RN截至目前只支持32个应用程序,你要么需要使用最新RN version 0.58.3作为

我已经成功地使用它,测试它的64个应用程序或者你也可以去掉64构建应用程序,然后Play商店中会自动安装应用程序,为用户的32个版本。

对于只支持32位取代你

include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"

include "x86" "armeabi-v7a"

类似地

def abiCodes = ['x86':1, 'x86_64':2, 'armeabi-v7a':3, 'arm64-v8a':4]

def abiCodes = ['x86':1, 'armeabi-v7a':2]

您可以跟踪RN 64位问题here

© www.soinside.com 2019 - 2024. All rights reserved.