1

Hi i am currently trying to create a signed apk for a flutter app but I've encounter a problem. Based on official docs https://flutter.dev/docs/deployment/android " Note: The keytool command might not be in your path—it’s part of the Java JDK, which is installed as part of Android Studio. For the concrete path, run flutter doctor -v and locate the path printed after ‘Java binary at:’. Then use that fully qualified path replacing java (at the end) with keytool." and ive check and thats really my situation, now my question is how can i change the location "C:\Program Files\Android\Android Studio\jre\bin\java" to "C:\Program Files\Android\Android Studio\jre\bin\keytool". Thanks for any answer coz i have already search how exactly to do that but failed.

David B.
  • 521
  • 1
  • 6
  • 18

2 Answers2

1

I have found a solution: Simply enter these into Windows command prompt. italic bold cd C:\Program Files\Java\jdk1.7.0_09\bin

following: How can I find and run the keytool

Sense Yna
  • 11
  • 1
  • yup thanks they can also run the command there, In my case Im using a visual studio and i just run the command on the terminal, Its just the i forgot to change the path name – David B. Sep 22 '19 at 12:06
  • @DavidB. Don't forget to 'accept' and/or 'upvote' answers on SO that you find helpful. – Adrian Mole Sep 22 '19 at 12:22
0

Yeah Dude I actually solved it my own, I just read the https://flutter.dev/docs/deployment/android again it seams that I didnt change the keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks (<-This is the problem, there is no path on my PC with that name, so just change it) -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key

To solved this issue:

Use this command keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key and change the c:/Users/USER_NAME/ with an actual directory.

veben
  • 19,637
  • 14
  • 60
  • 80
David B.
  • 521
  • 1
  • 6
  • 18