I am following the instructions to deploy a Flutter app to the play store. https://flutter.dev/docs/deployment/android
I have reached the point title Create a Keystore
I am prompted to enter a password, my name, etc, and get through all of the steps in that process until I say "yes" and then I receive the following error
[Storing ~/key.jks]
keytool error: java.io.FileNotFoundException: ~\key.jks (The system cannot find the path specified)
java.io.FileNotFoundException: ~\key.jks (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at sun.security.tools.keytool.Main.doCommands(Main.java:1144)
at sun.security.tools.keytool.Main.run(Main.java:343)
at sun.security.tools.keytool.Main.main(Main.java:336)
I'm not sure how to get around this.
I've tried using each of the following commands: "C:\Program Files\Android\Android Studio\jre\bin\keytool" -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
this one results in the error above.
I've also tried: "C:\Program Files\Java\jre-10.0.1\bin\keytool" -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
this one results in the following error:
[Storing ~/key.jks]
keytool error: java.io.FileNotFoundException: ~\key.jks (The system cannot find the path specified)
java.io.FileNotFoundException: ~\key.jks (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/java.io.FileOutputStream.<init>(Unknown Source)
at java.base/sun.security.tools.keytool.Main.doCommands(Unknown Source)
at java.base/sun.security.tools.keytool.Main.run(Unknown Source)
at java.base/sun.security.tools.keytool.Main.main(Unknown Source)
I have also tried adding each of these directories to path and instead issuing the command laid out in the docs: keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
but that gives me this error: 'keytool' is not recognized as an internal or external command,
Anybody run into this before?