KevinCL
KevinCL

Reputation: 23

Gradle build failed, keystore.properties not found

I tried to open this GitHub project with Android Studio https://github.com/SimpleMobileTools/Simple-Calendar

But sync failed because the system cannot find keystore.properties file.

I tried some solutions I found at other threads by commenting out release line in build.gradle, but it didnt work.

signingConfigs {
//        release {
//            keyAlias keystoreProperties['keyAlias']
//            keyPassword keystoreProperties['keyPassword']
//            storeFile file(keystoreProperties['storeFile'])
//            storePassword keystoreProperties['storePassword']
        }
    }

I could be commenting out the wrong parts or there are other reasons. Please advise.

Upvotes: 2

Views: 3934

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364808

If you want to use the same script, you have to create a keystore.properties in the root of your project with your values:

storePassword=123456
keyPassword=abcdef
keyAlias=myAlias
storeFile=../keystore.jks

You can find some tips here.

Otherwise you can have many options to configure the signing configs. For example:

signingConfigs {
        release {
            storeFile file("release.keystore")
            storePassword "******"
            keyAlias "******"
            keyPassword "******"
        }
    }

Other info in the official doc.

Upvotes: 2

Related Questions