Google Play:捆绑包未签名

djl*_*jlj 4 android signed bundle kotlin build.gradle

我正在 Kotlin 中创建应用程序,并且我向 Google 开发者帐户付费。但上传 .aab 文件时出现一些问题:The Android App Bundle was not signed。我阅读了 Stackoverflow 上有关它的所有主题并尝试了所有解决方案。不适合我。 以这个错误结束signingConfig signingConfigs.release:。仅当我设置时它才起作用。我也在用这个:和build.gradleCould not get unknown property 'release' for SigningConfigsigningConfigminifyEnabled falsedebuggable = false。那么我还必须尝试什么?2021年有新的解决方案吗?!

我的构建.gradle:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId '...'
        minSdkVersion 21
        targetSdkVersion 31
        versionCode 1
        versionName "1.00"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        manifestPlaceholders["hostName"] = "..."
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig
            debuggable = false
        }
        applicationVariants.all{
            variant ->
                variant.outputs.each{
                    output->
                        def name = "...apk"
                        output.outputFileName = name
                }
        }
    }
    buildFeatures{
        dataBinding = true
        viewBinding = true
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'com.github.amitshekhariitbhu.Fast-Android-Networking:android-networking:v1.0.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

}
Run Code Online (Sandbox Code Playgroud)

小智 18

当我为发布构建类型变体设置“可调试 true”时,我遇到了同样的问题,

请确保发布类型设置为“debuggable false”。

buildTypes {
    release {
        minifyEnabled true
        debuggable false
Run Code Online (Sandbox Code Playgroud)

}