I get this error when I try to Build Signed APK. I recently upgraded to API 23 but Generated APK:s successfully after that. Im confused. Asking for help and advise how to solve
File -> Invalidate Caches & Restart...
Build -> Build signed APK -> check the path in the dialog
I found the solution. I misplaced the path to the keystore.jks
file.
Searched for the file on my computer used that path and everything worked great.
On Linux or Ubuntu you need to use the complete path.
For example
/home/ubuntu/.android/keystorname.keystore
In my case I was using ~
instead of /home/user/
. Using shorthands like the below does not work
~/.android/keystorname.keystore
./keystorename.keystore
TL;DR: Check the path to your keystore.jks
file.
In my case, here's what happened:
I moved the project folder of my entire app to another location on my PC. Much later, I wanted to generate a signed apk file. Unknown to me, the default location of the path to my keystore.jks
had been reset to a wrong location and I had clicked okay. Since it could not find a keystore at the path I selected, I got that error.
The solution was to check whether the path to my keystore.jks
file was correct.
This is a problem that can arise from writing down a "filename" instead of a path, while generating the .jks file. Generate a new one, put it on the Desktop (or any other real path) and re-generate APK.
Editing the path of the keystore file solved my problem.