androidandroid-studio

Error: keystore.properties not found when cloning project


I'm trying to clone a repository from GitHub. While importing the project I'm getting an error:

E:\ProjectDir\keystore.properties (The system cannot find the file specified)

I've never encountered this problem when importing other repos from GitHub.


Solution

  • Many projects configure signing of release builds by means of a keystore.properties file. That file would contain properties pointing to where the release keystore is, what passwords to use to access the release key, and so forth. That keystore and the properties files should not be committed to a public version control system.

    Hence, when you check out the code from version control, that keystore.properties file will not exist, and Gradle will complain.

    There are ways to set up a build.gradle file to avoid this sort of error, checking to see if the file exists and only using its contents if it does. Tactically, in your case, simply commenting out the release build instructions would suffice.