简体   繁体   English

将裸工作流 expo React-Native 应用程序发布到 Google Play,该应用程序之前在托管工作流中发布

[英]Publishing a bare-workflow expo React-Native app to Google Play which was previously published in the managed workflow

My app was previously built while in the expo managed workflow.我的应用程序之前是在 expo 托管工作流中构建的。 I did this using expo ba .我使用expo ba做到了这一点。 Because android apps require that you release your app before you can add in-app-purchases, I uploaded this apk and released a beta using it.因为 android 应用程序要求您在添加应用程序内购买之前发布您的应用程序,所以我上传了这个 apk 并使用它发布了一个测试版。

I needed to switch to the bare workflow in order to implement in-app-purchases.我需要切换到裸工作流以实现应用内购买。 Now, when trying to create a build to release the actual app, I am following the React Native instructions but must create another upload key in order to create a build(which is an aab this time).现在,当尝试创建构建以发布实际应用程序时,我遵循React Native 说明,但必须创建另一个上传密钥才能创建构建(这次是 aab)。

On the play console it states在游戏控制台上它指出

Upload key: The key you use to sign your first release.上传密钥:用于签署第一个版本的密钥。 Sign every subsequent release with the same key to verify it's from you.使用相同的密钥签署每个后续版本,以验证它来自您。 Keep your upload key safe.确保您的上传密钥安全。 If it's ever lost or compromised, contact developer support to replace it.如果它丢失或损坏,请联系开发人员支持以更换它。

I'm pretty sure this is a problem because I used whatever expo was giving me to sign the original apk.我很确定这是一个问题,因为我使用了 expo 给我的任何东西来签署原始 apk。 I also cannot delete my original app and create a new app with the same bundle name because once an app is released it cannot be deleted.我也无法删除我的原始应用程序并创建一个具有相同捆绑名称的新应用程序,因为一旦应用程序发布,它就无法删除。

To get the previously used keystore file run运行之前使用的密钥库文件

expo fetch:android:keystore

Which will display something like这将显示类似

Keystore credentials
  Keystore password: MYAPP_UPLOAD_STORE_PASSWORD
  Key alias:         MYAPP_UPLOAD_KEY_ALIAS
  Key password:      MYAPP_UPLOAD_KEY_PASSWORD

  Path to Keystore:  /Path/To/my_upload_store_file.jks

Edit the file android/app/build.gradle to include the information above编辑文件android/app/build.gradle以包含上述信息

...
android {
    ...
    defaultConfig { ... }
    signingConfigs {
        release {
            //if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
                storeFile file("MYAPP_UPLOAD_STORE_FILE")
                storePassword "MYAPP_UPLOAD_STORE_PASSWORD"
                keyAlias "MYAPP_UPLOAD_KEY_ALIAS"
                keyPassword "MYAPP_UPLOAD_KEY_PASSWORD"
            //}
        }
    }
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}
...

Place my_upload_store_file.jks inside android/appmy_upload_store_file.jks放入android/app

Edit the file ~/.gradle/gradle.properties or android/gradle.properties , and add the following编辑文件~/.gradle/gradle.propertiesandroid/gradle.properties ,并添加以下内容

MYAPP_UPLOAD_STORE_FILE="my_upload_store_file.jks"
MYAPP_UPLOAD_KEY_ALIAS="MYAPP_UPLOAD_KEY_ALIAS"
MYAPP_UPLOAD_STORE_PASSWORD="MYAPP_UPLOAD_STORE_PASSWORD"
MYAPP_UPLOAD_KEY_PASSWORD="MYAPP_UPLOAD_KEY_PASSWORD"

Run the following in a terminal from the directory android从目录android在终端中运行以下命令

./gradlew bundleRelease

This will produce a file called app-release.aab inside the directory android/app/build/outputs/bundle/release/ .这将在android/app/build/outputs/bundle/release/目录中生成一个名为app-release.aab的文件。 Upload this file to the Google Playstore console将此文件上传到 Google Playstore 控制台

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Bare Workflow 在 React Native Expo 中启用 Kotlin 的困难 - Difficulties enabling Kotlin in React Native Expo with Bare Workflow 如何为 Expo 托管工作流反应原生应用程序添加非电话平板电脑支持 - How to add non-telephony tablet support for Expo managed workflow react native app 如何通过 Expo 的 Bare 工作流生成 APK 文件,但使用以前的 expo 的托管工作流 JKS 文件 - How to generate APK file by Expo's Bare workflow but using previous expo's Managed workflow JKS file “react-native start”有效,但在“react-native run-android”正在进行时崩溃,即使是在一个新项目上(裸工作流) - "react-native start" works, but crashes while "react-native run-android" is ongoing, even on a fresh project (bare workflow) 在根项目“我的项目”中找不到任务“lint”。 一些候选者是:'init' React Native Expo SDK 45 Bare Workflow - Task 'lint' not found in root project 'My Project'. Some candidates are: 'init' React Native Expo SDK 45 Bare Workflow 您如何设置裸工作流反应本机项目? - How do you set up a bare workflow react native project? 如何为 React Native Bare 工作流指定重定向 URI - How to specify the Redirect URI for React Native Bare workflow 使用 eas build/managed 工作流程将 gradle 存储库添加到 expo 应用程序构建 - Add a gradle repository to an expo app build with eas build / managed workflow 如何在 expo 托管工作流中为 android 向 app.json 添加值? - How to add values to app.json for android in expo managed workflow? expo 裸工作流不能使用nativemodule - expo bare workflow can't use nativemodule
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM