I'm getting error with Keystore file in GitHub Actions with flutter build apk

Viewed 602

I'm getting the error ´´´Keystore file '/Users/runner/work/Quiz-App/Quiz-App/android/app/keystore/upload-keystore.jks' not found for signing config 'release'.´´´ when trying to build my android app written in Flutter using GitHub Actions.

This is my workflow yml file:

`https://pastebin.com/96tvjAEj´

And this is the snippet inside build.gradle in android/app that I use:

´https://pastebin.com/ws3Djk7M´

It's expecting this file in /Users/runner/work/Project-Name/Project-Name/android/app/keystore/upload-keystore.jks

but I think it can't find it. Thanks

2 Answers

This is because you are NOT uploading your keystore file with your github commits. Which does make sense because it's a security issue to have them checked into version control. Read the error again, it is telling you the exact problem. You can overcome it by uploading your keystore to the path specified, or go to .gitignore and remove it from there so it get's uploaded with your code pushes.

I had a similar error and fixed it by creating a keystore/ folder within /android/app/ then put the upload-keystore.jks file inside. My folder wasn't named keystore though.

Related