How to fix android.defaultConfig.versionCode is set to -1, but it should be +ve error

Hello team, i don’t know coding just try to learn and do by watching videos or tutorials,
Though i have cryptomator but i want to build it myself with provided source code.
So i simply download cryptomator source code zip and extract it. Then select “open an existing project” in android studio and select these source code folder.
Everything goes fine then i tried to install it on my mobile but it told me that " android.defaultConfig.versionCode is set to -1 it should be +. "
Would someone like to help me here please?

I think you downloaded the source code instead of cloning the git repository?

To fix this you can clone the repo and use it as it is or you can set

to something > 0, e.g. androidVersionCode = 1

@SailReal sir i have successfully created the app. i want to know two things. please
1- on playstore version is 1.5.10 but it is 1.5.11-snapshot is it beta version or same as 1.5.10 versioned.
2- is there any article to make working its cloud providers. how to configure them.
thanks. please provide these details whenever you have time. :slightly_smiling_face:

Yes, 1.5.11 is currently beta software. Google didn’t review this version yet but it will be in the Playstore beta channel soon.

If you are talking about Dropbox and Onedrive: You have to provide API keys to access this cloud services. In case of Dropbox, also have a look into this issue:

i don’t know how to navigate to android/ to enter api in android studio. i tried hard but didn’t find.

Press ctrl + shift + n and enter or scroll in your left panel down to the file.

1 Like