# Gradle: Keystore file not set for signing config release

**URL:** <https://discuss.circleci.com/t/gradle-keystore-file-not-set-for-signing-config-release/8563>\
**Category:** Mobile\
**Tags:** gradle, keys, android\
**Created:** [December 8, 2016, 1:54pm UTC](https://discuss.circleci.com/t/gradle-keystore-file-not-set-for-signing-config-release/8563 "2016-12-08T13:54:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valeriy](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/valeriy/32/14775_2.png) [@Valeriy](https://discuss.circleci.com/u/Valeriy)\
**Post date:** [December 8, 2016, 1:54pm UTC](https://discuss.circleci.com/t/gradle-keystore-file-not-set-for-signing-config-release/8563/1 "2016-12-08T13:54:22Z")

</div>

Hi, guys!  
I’m facing a problem with signing an Android app. I can easily sign the app locally but when I do this via CircleCI I have an error:

```
Execution failed for task ':app:validateSigningMtDebugSigned'.
> Keystore file not set for signing config release

```

I’m attaching the signing config for release build to show how I do this:

```
signingConfigs {
        if (System.getenv("CIRCLECI")) { // for circleci.com
            debug {
                storeFile file(System.getenv("KEYSTORE_DEBUG"))
                storePassword 'android'
                keyAlias 'androiddebugkey'
                keyPassword 'android'
            }
            release {
                storeFile file(System.getenv("KEYSTORE_RELEASE"))
                keyAlias System.getenv("KEYSTORE_PASSWORD")
                storePassword System.getenv("KEY_ALIAS")
                keyPassword System.getenv("KEY_PASSWORD")
            }
        } else {
            release {
               ...
            }
        }
    }

```

As you can see I store the path to release and debug keys in environment variables. Here is the values for storeFile:

```
KEYSTORE_RELEASE: /home/ubuntu/android/keys/release.keystore
KEYSTORE_DEBUG: /home/ubuntu/android/keys/debug.keystore

```

Do you have an idea where could be a problem?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:33am UTC](https://discuss.circleci.com/t/gradle-keystore-file-not-set-for-signing-config-release/8563/2 "2018-06-18T11:33:35Z")

</div>


