You are on page 1of 1

Search… Log In Sign Up

Home

PUBLIC

Stack Overflow

Tags
“The signing configuration should be specified in Gradle build scripts”… I did it Ask Question
Users

Jobs I have a big issue when I come to sign my application: I have set the signing configuration in asked 5 years, 3 months ago
accordance with the doc:
viewed 8,074 times
12 signingConfigs {
Teams active 11 months ago
Q&A for work release {
storeFile file("lomapnew.keystore")
storePassword "myPassword"
Learn More keyAlias "myAlias" BLOG
4 keyPassword "Something...."
} Stack Overflow & InfoJobs: Bringing
} Opportunities to Developers in Spain

But I still get this error message: "The signing configuration should be specified in Gradle build
scripts"

Want a php job?


Elasticsearch Engineer - PHP
android gradle signing android-gradle
Browzzin Pte Ltd No office location
$40K - $60K REMOTE

share improve this question edited Jan 8 '14 at 20:24 asked Oct 7 '13 at 18:19 php elasticsearch

Jonik Waza_Be
51.7k 55 210 316 26.4k 43 163 238 Web Developer (Magento)
Bear Group No office location
Have you set this signing config for the release buildType? – Krylez Oct 7 '13 at 18:49 REMOTE

php jira
I guess that what the message means is that you need the signingConfigs to be inside buildscript { } in
the gradle file. – JB Nizet Oct 7 '13 at 18:56

1 @JBNizet I don't think that's true, or at least it's not true for my config. – Krylez Oct 7 '13 at 19:33 Related
add a comment 469 Gradle build without tests

3 Answers active oldest votes


47 Signing product flavors with gradle

459 How to create a release signed apk file


using Gradle?
I'm going to go out on a limb and guess that you haven't set the signing configuration for the release
17 Gradle signing app with packageRelease
build type. The debug build type is automatic, so it's not obvious that this is a necessary step for all
“specified for property
20 other build types, including release. 'signingConfig.storeFile' does not exist”

You can apply the signing config like so: 17 Proper way to use System environment
variables in gradle using Android Studio
android {
signingConfigs { 434 What is the difference between
// It's not necessary to specify, but I like to keep the debug keystore compileSdkVersion and targetSdkVersion?
// in SCM so all our debug builds (on all workstations) use the same
9 Android Studio does not sign the code for
// key for convenience
debug build
debug {
storeFile file("debug.keystore")
2 Gradle, 'could not find property'
}
release {
1 Is it possible to ignore the storeFile when
storeFile file("release.keystore")
building a debug version of the application?
storePassword "myPassword"
keyAlias "myAlias" Gradle build: Could not find method
2
keyPassword "Something...." signingConfig() for arguments
}
}
Hot Network Questions
buildTypes {
/* This one happens automatically What fallacy is assuming something is the case
debug { because of past events
signingConfig signingConfigs.debug
Do hard to pronounce names break immersion?
}
*/ Why can the regenerative brakes of the Oslo
release { Metro only share energy with other trains if they
signingConfig signingConfigs.release are "nearby"?
}
} What happens when a 5/5 blocks a 6/4?
}
How could intelligent animals defend against
humans?
share improve this answer edited Oct 7 '13 at 19:54 answered Oct 7 '13 at 19:45
Should I remove old wood glue before reinstalling
Krylez a board on a table, and how?
13.7k 4 26 40
What is the purpose of 1Ω resistor at the output
filter to ground?
can you tell me where the release.keystore file should be located in order for file("release.keystore") to Execution plan doesn't show memory grant
work? – Bhargav Jan 27 '16 at 3:47
How to deal with people who will not read?
@Bhargav The file method is relative to the project root. The keystore live anywhere in your project as long as
you update the path in your build file. docs.gradle.org/current/javadoc/org/gradle/api/… – Krylez Jan 27 '16 at Who would become the US President if a fictional
16:28 character like Cthulhu is elected?

Is it wise to backup keystore files along with your repository in git privately? – Bhargav Jan 28 '16 at 4:32 I get bored when people talk too much in
meetings. What should I do?
I wouldn't put your release in a git repo, but it's a judgement call. The problem is that it's essentially a one-way Could the Bunker Dwellers become noticeably
trip. With the way git history works, it's easy to recover deleted files. If you ever wish to open source the project, different from Wastelanders?
you might accidentally expose a long deleted release key. – Krylez Jan 28 '16 at 19:06
Properties of Water
add a comment
If there are no diminished keys, then why does
Locrian mode exist?

What happens when the spell Mental Prison ends


if a creature reaches through?

Disable SSL certificate validation in Ubuntu totally

How fast can printer head move without damaging


steppers?

How should I deal with a player who wants to


I like to keep passwords out of my build file. Hence I create a properties file that I load with dictate loot distribution?

WordStar's "column mode"


def keystorePropertiesFile = rootProject.file("./local.properties")
1 def keystoreProperties = new Properties() Am I conveying disrespect if I omit my gender
keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) pronoun from a conference nametag?

Is it possible for kingdoms to maintain peace


Then I define signingConfigs like so: between each other throughout 5 centuries?

Incomplete Word Rectangle


signingConfigs {
releaseSigning { Will my breaker accept #10 wire even though the
storeFile file(keystoreProperties['storeFile']) chart lists #14?
storePassword keystoreProperties['keystore.live.storepassword']
keyAlias = keystoreProperties['keystore.live.keyalias'] Extremely low frequency filters
keyPassword = keystoreProperties['keystore.live.keypassword']
}
question feed
debugSigning {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['keystore.debug.storepassword']
keyAlias = keystoreProperties['keystore.debug.keyalias']
keyPassword = keystoreProperties['keystore.debug.keypassword']
}
}

This doesn't work well with the menu option "create Signed apk" so I create flavors:

productFlavors {
mydebug {
signingConfig signingConfigs.debugSigning
}
myrelease {
signingConfig signingConfigs.releaseSigning
}
}

and now the signingconfigs work with the run button on the toolbar. For a default keystore the
local.properties looks like

ndk.dir=/opt/sdk/ndk-bundle
sdk.dir=/opt/sdk
storeFile=/home/christine/.android/debug.keystore
keystore.debug.storepasswd=android
keystore.debug.keyalias=androiddebugkey
keystore.debug.keypassword=android
keystore.live.storepasswd=android
keystore.live.keyalias=androiddebugkey
keystore.livetest.keypassword=android

In your Jenkins build script, you need to create a symbolic link from local.properties to where the
properties file is on your build server.

share improve this answer answered Feb 13 '18 at 16:32


Christine
3,934 2 29 47

add a comment

Answer is already given but i would like to highlight the other ways also, We can specify the
information manually like below where we have to specify full path to our keystore location like this
0 signingConfigs {
release {
storeFile file('O:/Android/Projects/yourKeyStore.jks')
storePassword "qwerty"
keyAlias "yourProjectKeyAlias"
keyPassword "ProjectKeyPassword"
}
}

This can also be specified in Signing Report if you go in

File-->Project Structure

Choose your project app module and select the signing report where you can fill up the information
and it will automatically add previous release information in the gradle file.

Finally you just have to add

signingConfig android.signingConfigs.release

in the buildTypes {...} section. That will complete the signing procedure.

share improve this answer answered Mar 30 '16 at 19:44


Purvik Rana
118 10

add a comment

Your Answer

Sign up or log in Post as a guest


Name
Sign up using Google

Sign up using Facebook Email


Required, but never shown

Sign up using Email and Password

Post Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie
policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged android gradle signing

android-gradle or ask your own question.

STACK OVERFLOW PRODUCTS COMPANY STACK EXCHANGE Blog Facebook Twitter LinkedIn
NETWORK
Questions Teams About
Technology
Jobs Talent Press
Life / Arts
Developer Jobs Directory Engagement Work Here
Culture / Recreation
Salary Calculator Enterprise Legal
Science
Help Privacy Policy
Other
Mobile Contact Us site design / logo © 2019 Stack Exchange Inc; user contributions
licensed under cc by-sa 3.0 with attribution required.
Disable Responsiveness rev 2019.1.31.32775

You might also like