keytool error :java.io.IoException:Incorrect AVA format

前端 未结 9 1415
南笙
南笙 2021-01-30 08:06

I am new to Android development; when I have been trying to sign the application I have got the following error. Can anyone help me on this issue?

keytool error          


        
相关标签:
9条回答
  • 2021-01-30 08:28

    Special chars/escaping all good answers/could be the problem; you didn't share your actual "keytool" command line so harder to give an accurate answer. If you're trying to gen a pub/priv key pair ("-genkeypair" param), then 1 problem would be that the cert subject distinguished name ("-dname" arg) wasn't specified in the correct X.500 AVA ("Attribute/Value Assertion") format. For example, omitting the "CN=" in front of the subject common name (CN). Param should look something like this:

    keytool ... -dname="CN=SomeCertSubject" ...
    

    In this distinguished name param, "CN" ("Common Name") is the "Attribute", "SomeCertSubject" is the "Value".

    0 讨论(0)
  • 2021-01-30 08:28

    Can't google say "Invalid Character". Instead, they say "Incorret AVA format" Strip away any non alphanumeric characters, no accents and no weird letters.

    0 讨论(0)
  • 2021-01-30 08:32

    It's a common mistake, when we're going to generate Signed APK in Android Studio. So in Keystore file you can't use any special character or symbol such as (, \ + - * / < > ; ' ") otherwise, you get java.io.IoException.

    See a Demo, how can you fill-up your Keystore file:

    Password: anything without special character or symbol

    Alias: Key0 (up to you)

    Validity (years): 25 (up to you)

    First and last Name: Your proper Name but don't use special character in your name like $unny @dam

    Organizational Unit: Your organization Name

    Organization: Your organization Name

    City or Locality: Your City Name

    State or Province: Your State or Province Name

    Country Code (XX): Use your country code, if you don't know then search Google.

    Then click OK

    0 讨论(0)
提交回复
热议问题