Q:

Illegal option: keystore keytool -genkeypair [OPTION]... Error

I'm trying to generate a keystore with these line of code
keytool -genkey -v keystore app-key.keystore alias app-key -keyalg RSA -keysize 2048 -validity 10000

but showing
Illegal option: keystore
keytool -genkeypair[OPTION]...

is this a new error?
I'm using mac terminal and trying to deploy android in google playstore

A:

In your command, you are missing a few "-" before keystore & alias 
keytool -genkey -v -keystore app-key.keystore 
    -alias app-key -keyalg RSA -keysize 2048 -validity 10000

Here are all the legal options for keytool -genkey usage, please note that "-" is required for valid usage:
-alias <alias>                  alias name of the entry to process
-keyalg <keyalg>                key algorithm name
-keysize <keysize>              key bit size
-sigalg <sigalg>                signature algorithm name
-destalias <destalias>          destination alias
-dname <dname>                  distinguished name
-startdate <startdate>          certificate validity start date/time
-ext <value>                    X.509 extension
-validity <valDays>             validity number of days
-keypass <arg>                  key password
-keystore <keystore>            keystore name
-storepass <arg>                keystore password
-storetype <storetype>          keystore type
-providername <providername>    provider name
-providerclass <providerclass>  provider class name
-providerarg <arg>              provider argument
-providerpath <pathlist>        provider classpath
-v                              verbose output
-protected                      password through protected mechanism

You may bring up these list of options any time by running
keytool -genkey -help

