Reputation: 3352
I am working on a project and submitted for review by one of my peers. In their previous review, he stated that my keystore
file needed to be saved in a relative path. I am submitting via GitHub
. Currently, my keystore
file is saved in the root directory of my project. Also, in my build.gradle
, I have the following:
signingConfigs {
config {
keyAlias 'Udacity'
keyPassword 'xxxxxxxx'
storeFile file('/Users/user/Applications/LiveVotingUdacity/livevotingkeystore')
storePassword 'xxxxxx'
}
}
How do I save to a relative path? I am very confused.
Upvotes: 6
Views: 5795
Reputation: 4051
A relative path is a way to specify the location of a directory relative to another directory.
According to your code, your keystore
file is located here.
/Users/user/Applications/LiveVotingUdacity/livevotingkeystore
And build.gradle
file, which you use to specify signingConfigs
, is placed inside you app
folder:
/Users/user/Applications/LiveVotingUdacity/app
You need somehow specify that keystore
file is located one folder above in folder tree. There is ..
symbol which literally means 'parent directory'.
So to specify relative path to your keystore
, you should use the next path
storeFile file('../livevotingkeystore')
Upvotes: 12