gpt4 book ai didi

android bundleRelease 不签署 aab

转载 作者:搜寻专家 更新时间:2023-11-01 08:17:58 26 4
gpt4 key购买 nike

我已经编写了一个 Android 应用程序,但发布过程的最后一步仍未完成。我假设当我运行 gradle bundleRelease 时,它​​会生成我可以在 Play 商店上传的 aab 文件。但是 Play 商店说 bundle 未签名。但是,构建过程表示它正在签名:

> Task :app:preBuild UP-TO-DATE
> Task :app:preReleaseBuild UP-TO-DATE
> Task :app:compileReleaseRenderscript NO-SOURCE
> Task :app:generateReleaseResValues UP-TO-DATE
> Task :app:generateReleaseResources UP-TO-DATE
> Task :app:mergeReleaseResources UP-TO-DATE
> Task :app:checkReleaseManifest UP-TO-DATE
> Task :app:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :app:mainApkListPersistenceRelease UP-TO-DATE
> Task :app:processReleaseManifest UP-TO-DATE
> Task :app:bundleReleaseResources UP-TO-DATE
> Task :app:checkReleaseDuplicateClasses UP-TO-DATE
> Task :app:mergeExtDexRelease UP-TO-DATE
> Task :app:compileReleaseAidl NO-SOURCE
> Task :app:generateReleaseBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateReleaseSources UP-TO-DATE
> Task :app:javaPreCompileRelease UP-TO-DATE
> Task :app:processReleaseResources UP-TO-DATE
> Task :app:compileReleaseJavaWithJavac UP-TO-DATE
> Task :app:transformClassesWithDexBuilderForRelease UP-TO-DATE
> Task :app:mergeDexRelease UP-TO-DATE
> Task :app:mergeReleaseShaders UP-TO-DATE
> Task :app:compileReleaseShaders UP-TO-DATE
> Task :app:generateReleaseAssets UP-TO-DATE
> Task :app:mergeReleaseAssets UP-TO-DATE
> Task :app:mergeReleaseJniLibFolders UP-TO-DATE
> Task :app:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
> Task :app:buildReleasePreBundle UP-TO-DATE
> Task :app:collectReleaseDependencies UP-TO-DATE
> Task :app:configureReleaseDependencies UP-TO-DATE
> Task :app:packageReleaseBundle UP-TO-DATE
> Task :app:signingConfigWriterRelease UP-TO-DATE
> Task :app:signReleaseBundle
> Task :app:bundleRelease

gradle 构建脚本中有一个签名部分:

android {
...
signingConfigs {
release {
storeFile file(...)
storePassword '...'
keyAlias '...'
keyPassword '...'
}
}

如果我在运行构建之前删除所有 aab 文件,则会在

中生成一个 app.aab
..\app\build\outputs\bundle\release

似乎一切正常,只是 play 商店不接受 aab:

The Android App Bundle was not signed.

如何构建可发布的 aab?

最佳答案

如果有人仍在寻找解决方案 - 在发布配置中将 debuggable 设置为 false。您的应用构建 gradle 文件应包含以下内容 -

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
debuggable = false
}
}

关于android bundleRelease 不签署 aab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56504709/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com