android - 在发布模式下颤振构建 appbundle
问题描述
我已经使用 android studio 在颤振中构建了一个应用程序,并试图在 Play 商店中发布它。
根据https://flutter.dev/docs/deployment/android#reviewing-the-build-configuration,“运行flutter build appbundle
(运行颤振构建默认为发布构建。)”
但是,当我尝试在播放控制台上上传此内容时,我收到错误消息“您上传了一个在调试模式下签名的 APK 或 Android App Bundle。您需要在发布模式下签署您的 APK 或 Android App Bundle。”
我应该怎么做?
从我的 gradle.build :
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.rtterror.custom_snooze_alarm"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
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
}
}
}
解决方案
推荐阅读
- c - GlobalAlloc(GMEM_ZEROINIT|GMEM_FIXED, 0) 会发生什么
- ios - 调用时未在地图视图上显示注释
- gnuplot - 对于具有大量数据的小图,gnuplot 中的线条样式变得不清楚
- r - 使用纬度和经度确定一条线的中间
- javascript - 如何从 Svelte 中的路由数组生成 sitemap.xml
- swiftui - ForEach 具有动态与静态范围
- jakarta-ee - 在 JAX-RS 中使用 Multipart/Form-Data 的实现方式无关
- php - 如何通过我的插件页面运行功能并在同一页面上打印结果
- javascript - 如何使用 VenoBox 显示 Django 页面?
- keras - 深度学习早期停止循环中的回调奇怪行为