Search code examples
androidandroid-studiokeystoreandroid-keystore

unable to create signed apk (keystore) android studio 1.4.1


I saw many tutorials in which the user is able to select the folder to create new keystore in....but in android studio 1.4.1.... I can only select *.jks files. Also I created a keystore using keytool (java) and then created the signed apk choosing existing keystore....I was able to create app-release.apk....but google is giving this error on upload

You uploaded an APK signed with a certificate that is not yet valid. You need to sign your APK with a certificate that is currently valid. Learn more about signing. You need to use a different package name because "com.example" is restricted.


Solution

  • For the first error: You uploaded an APK signed with a certificate that is not yet valid. You need to sign your APK with a certificate that is currently valid.

    Answer: I had to change my system date to two days back and then again generate the keystore. ....or you can simply wait till your certificate becomes valid.

    For the second error: You need to use a different package name because "com.example" is restricted.

    Answer: In Android Studio go to the tree hierarchy and right click your package name folder under "app/java/your_package_name" and go to refractor and then rename. A pop up will appear....choose rename package and rename it to something else than default com.example.package_name. Also change it in AndroidManifest.xml file.