android - 您上传了以 Debug模式登录的 APK 或 Android App Bundle

标签 android react-native flutter

我正在尝试将我的 AAB 文件上传到 Google Play 商店,我遵循 https://facebook.github.io/react-native/docs/signed-apk-android用于生成 .aab 文件,但出现此错误 您上传了在 Debug模式下签名的 APK 或 Android App Bundle。您需要在 Release模式下签署您的 APK 或 Android App Bundle。

最佳答案

在 android/app/build.gradle

 buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://facebook.github.io/react-native/docs/signed-apk-android.
            signingConfig signingConfigs.debug
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

改成
buildTypes {
        debug {
            signingConfig signingConfigs.debug
        }
        release {
            // Caution! In production, you need to generate your own keystore file.
            // see https://facebook.github.io/react-native/docs/signed-apk-android.
            signingConfig signingConfigs.release
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }

关于android - 您上传了以 Debug模式登录的 APK 或 Android App Bundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57990519/

相关文章:

android - 话筒图形声音分析仪

react-native - 假设 AppDelegate 中不存在某些代码,则 react-native-navigation 安装说明存在问题

flutter - 使用用户的实时位置 flutter 更新折线路线

flutter - Flutter:Freezed和json_serializable软件包的编译问题

android - Android NDK 中是否支持 OpenKODE 核心?

android - Kivy 和 Google Play 服务

java - 在 Android 上使用 OpenGL 绘制视频帧

javascript - 使用 V8 而不是 JavascriptCore 进行 React-Native

reactjs - react native 状态不更新功能

dart - 如何在 flutter 中基于同一个流 Controller 获取多个流?