Android Question Amazon Appstore: Invalid apk

I've been trying to upload my app on the amazon appstore but it returns "Invalid APK"
I read on their forums that maybe your apk is missing Version Code and Version Name attribute. Try adding #VersionName and #VersionCode in the build.gradle file.
OK, but how do i add them when i'm not using android studio?