Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

myConfigs is unknown for signingConfig #8

Open
zameelpichen opened this issue Nov 14, 2017 · 4 comments
Open

myConfigs is unknown for signingConfig #8

zameelpichen opened this issue Nov 14, 2017 · 4 comments

Comments

@zameelpichen
Copy link

There is no code block found for myConfig

this error appears

Error:(19, 0) Could not get unknown property 'myConfigs' for SigningConfig container of type org.gradle.api.internal.FactoryNamedDomainObjectContainer.
Open File

@LamraniOthmane
Copy link

For those who are still facing this issue try to add your signingConfigs like this (it worked for me)

signingConfigs {
config {
keyAlias 'xxx'
keyPassword 'xxx'
storeFile file('xxx')
storePassword 'xxx'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

        signingConfig signingConfigs.config
    }
}

@yashlinmaistry
Copy link

I had the same issue

What worked for me was making sure signingConfigs is before productFlavors.

e.g.
defaultConfig {}
signingConfigs {}
productFlavors {}
buildTypes {}

@AyushKoul00
Copy link

I had the same issue

What worked for me was making sure signingConfigs is before productFlavors.

e.g.
defaultConfig {}
signingConfigs {}
productFlavors {}
buildTypes {}

Hi, I tried this but it still gives me the same error.

@Aniruddha-Tapas
Copy link
Owner

In order to create a signed release APK, you'll have to specify your own sigining configuration.
You can edit the app/build.gradle to:

android {
    ...
    signingConfigs {
        release {
            storeFile file("../keystore/keystore.jks")
            storePassword "******"
            keyAlias "******"
            keyPassword "******"
        }
    }
    ...
    buildTypes {
        release {
            ...
            signingConfig signingConfigs.release
        }
    }
}

You can learn more about signing configs with gradle here.

Moreover if you don't need a signed apk, you can simply remove the line

signingConfig signingConfigs.config

from the gradle file. Thanks for pointing it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants