android - Play 商店登录失败

标签 android flutter google-play-console

当我将应用发布到 play store 时,登录 play store 失败。它显示错误。错误是 您已在 Debug模式下导入带有签名的 APK 或 Android App Bundle。您必须以输出版本模式对其进行签名。了解有关签名的更多信息。 我已经使用了 build.gradle 的 key 。我将属性设置为 key.properties。 key.properties 是这样的:

storePassword=*******
keyPassword=*********
keyAlias=key
storeFile=/home/user/key.jks

build.gradle 是这样的

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
   keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

在 android{} 中我这样添加:

signingConfigs {
    release {
        keyAlias keystoreProperties['keyAlias']
        keyPassword keystoreProperties['keyPassword']
        storeFile file(keystoreProperties['storeFile'])
        storePassword keystoreProperties['storePassword']
    }
}
buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
    }
}

我通过这个命令生成了 key 。

keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key

但它仍然显示错误。这不是签约玩商店。

最佳答案

change this:

release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
    }

有了那个:

release {
            signingConfig signingConfigs.release
}

关于android - Play 商店登录失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57574656/

相关文章:

android - 是否所有 android 版本 Api-8 及以上都有后退按钮

android - Cordova 文件插件 - 在设备中保存文件

android - Android 浏览器中的 CSS 布局

flutter - 在ShowDialog的TextField上显示错误文本

android - 将 App Bundle 上传到 Google Play 卡在处理中

android - Android 上具有客户端身份验证的 SSL/TLS http 客户端的运行时配置

flutter - 在哪里可以为我的Android应用存储图像?

flutter - 如何在flutter中使用Firebase使用电话身份验证来检查用户是否已登录?

android - Google Play 控制台发布不同的 apk 然后我上传

android - 我可以丢弃并重新上传上传到 Playstore 的相同版本的未发布 APK 吗?