cannot find keytool on a mac

匆匆过客 提交于 2019-11-30 11:49:26

If you are using Eclipse under Mac OS X you just need to
Select File -> Export -> select Android -> Export Android Application -> click next -> select your project -> click next -> here you just chose Create new keystore

Reefwing

To answer the original question, on my Mac, keytool is found at /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/keytool.

You can locate the Java home directory using the /usr/libexec/java_home command line tool on Mac OS X 10.5 or later.

The actual tool should be installed all ready, as to my knowledge it ships with the MAC. You then have to create the .keystore file http://www.androiddevelopment.org/tag/keytool/ shows how to do it

RojasJuniorE

I did the following and it worked for me:

  1. /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/keytool -genkey -v -keystore my-release-key.keystore -alias my_keystone -keyalg RSA -keysize 2048 -validity 10000
  2. jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk my_keystone
  3. /Users/developer/Library/Android/sdk/build-tools/28.0.3/zipalign -v 4 app-release-unsigned.apk nameapp.apk
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!