您需要在发布模式下签署您的 APK 或 Android App Bundle
You need to sign your APK or Android App Bundle in release mode
我正在尝试将 flutter 应用程序上传到 google Play 商店,但它不允许我上传 aab 文件。错误是 "You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode. " 并且我像下面这样更改了我的代码。
所以我把signinConfigs改成了release,但是还是报同样的错误...
此外,其中一个教程有一个捆绑文件,其中包括一个发布文件和一个 aab 文件。 (https://youtu.be/zHtco9_Aw7I). But my file structure is something like below. 我不确定我做的是否正确...
另外,google play console 应该添加哪个文件?我用了 app.apk 但没用。
添加
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
给你的 /android/app/build.gradle.
为此,您还应该生成一个密钥库并在之前的 build.gradle 文件中引用它,例如:
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
您还应该阅读文档:https://flutter.dev/docs/deployment/android。
appbundle 是使用 flutter build appbundle
创建的,位于 \build\app\outputs\bundle\release
。您应该将该捆绑包文件提交到 Play 商店,您可以在
阅读更多相关信息
我正在尝试将 flutter 应用程序上传到 google Play 商店,但它不允许我上传 aab 文件。错误是 "You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode. " 并且我像下面这样更改了我的代码。
所以我把signinConfigs改成了release,但是还是报同样的错误...
此外,其中一个教程有一个捆绑文件,其中包括一个发布文件和一个 aab 文件。 (https://youtu.be/zHtco9_Aw7I). But my file structure is something like below.
另外,google play console 应该添加哪个文件?我用了 app.apk 但没用。
添加
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
给你的 /android/app/build.gradle.
为此,您还应该生成一个密钥库并在之前的 build.gradle 文件中引用它,例如:
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
您还应该阅读文档:https://flutter.dev/docs/deployment/android。
appbundle 是使用 flutter build appbundle
创建的,位于 \build\app\outputs\bundle\release
。您应该将该捆绑包文件提交到 Play 商店,您可以在