Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while signing android bundle: Execution failed for task ':app:signReleaseBundle'

I was trying to build a release build of Flutter android app and got following error: (Macbook M1 using terminal command)

* What went wrong:                                                      
Execution failed for task ':app:signReleaseBundle'.                     
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > kotlin.KotlinNullPointerException (no error message)

I've no idea how to fix this issue. The android/app/build.gradle of relevant part looks like:

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:2.0.1'
}
like image 898
Thanon K Avatar asked Aug 11 '21 15:08

Thanon K


1 Answers

I had almost the same problem:

* What went wrong:
Execution failed for task ':app:signReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
   > kotlin.KotlinNullPointerException (no error message)

In my case, there was a typo in my key.properties file. I had keyPasswork instead of keyPassword and now everything is working fine. I suggest OP checks this file, too.

like image 172
plotsklapps Avatar answered Sep 18 '22 15:09

plotsklapps