Error when attempting to sign Android app: Certificate chain not found - android

I've done this before but I am running into errors this time and I can't figure out what I am doing wrong. I have the keystore file and the unsigned apk inside the jdk bin folder where the jarsigner exe is. Here are two screenshots of my errors.

Related

Android Studio Missing Keystore on SigninReport

i was trying to run signinReport to see my Sha1 when it gave me this error:
But I wanted to say that a few days ago I moved the project from one PC to another but with it I also moved the jks signature. will it be an error created by the old keystore signature path? how can i solve?

Keystore error when trying to run android calabash tests

I'm trying to run some calabash tests in RubyMine, to test a previously build .apk file.
When I try to run all features, the following error message pops up. I built the .apk file with AndroidStudio, not specifying a certain keystore, so I guess the "default" debug.keystore is used.
No MD5 fingerprint found:
Keytool Error: java.lang.Exception: Keystore file does not exist: X:/.android/debug.keystore
java.lang.Exception: Keystore file does not exist: X:/.android/debug.keystore
at sun.security.tools.KeyTool.doCommands(KeyTool.java:738)
at sun.security.tools.KeyTool.run(KeyTool.java:340)
at sun.security.tools.KeyTool.main(KeyTool.java:333)
(RuntimeError)
As far as I know the provided keystore for testing has to be the same as the one used when building the .apk, which should be the debug.keystore in my .android folder, since its the only one present on my computer.
I'm not sure why keytool tries to find the keystore file on the X:/ drive instead of the D:/ drive where the debug.keystoreexists.
Is there any way to tell keytool (or RubyMine) which keystore to use? Or may there be another problem I'm not aware of? Any hints or help would be appreciated.
Note: I was able to run the tests when using an older .apk. Only when I did some changes in the android code and build the app again the error occurred when trying to run the tests.
We try to autodetect the keystore. You can just use calabash-android setup to specify your keystore. Run the command from your test working directory.

You uploaded an APK that is not zip aligned error

I have just finished and signed the apk through android studio,
then I have did an apk protect through apkprotect.com
when I am trying to upload the apk to play store I got this error " You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again. "
if I upload the original apk I got no errors,
I have tried to add zipalign true in the build.gradle but nothing happened
I have tried also disable and enable proguard .
You can run zipalign manually in command line:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
Note that zipalign is located inside ${sdk.dir}\tools
For more details visit zipalign
[Update]
Also, If you need to sign it you can run:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore YOURKEYSTORE unsigned.apk alias_name
(jarsigner is located inside java JDK_HOME/bin)
I got the same "You uploaded an APK that is not zip aligned... blah, blah" error when by mistake I tried to upload a DEBUG version of my .apk file to Google Play. It's a bit misleading error because the real problem is that you cannot distribute a debug version which additionally is not signed with your Google Android Developer key. (You can only upload an .apk compiled as release version, and it must be signed, which happens in the same step, at least if you're using Eclipse).
Make sure you distribute an .apk file which is your Signed Release version, as described here:
http://developer.android.com/tools/publishing/app-signing.html#releasecompile
This question and its answers are old; so we expect things to change. As of today, the zipalign tool is in the ANDROID_HOME directory under build-tools/[version]/ so my path is currently:
/android-sdk/build-tools/22.0.0/zipalign
Using the zipalign tool is not necessarily the answer here though, what you actually need to do is sign your apk.
Steps if using Xamarin for VS2017:
Build project
Right click and Archive project
Use Ad Hoc distribution channel
Sign your APK with your Signing Identity and Save As to produce an APK that is ZIP aligned.
Your APK can be uploaded to Google Play.
I was using Cordova, uploaded a signed APK but still got this error.
The ziptool is what helped me, it's located at ~AndroidSDK\build-tools\24.0.0\zipalign.exe
So for example :
"~\AndroidSDK\build-tools\24.0.0\zipalign.exe" -f -v 4 android-release-signed.apk android-release-signed-zipaligned.apk
I was using Cordova and the command line getting this error. I opened the project in Android Studio and used Android Studio to build the signed apk and the error went away.
When using the Cordova node.js CLI without going through Android Studio, it is necessary to update the PATH environmental variable to include the android build tools:
%ANDROID_HOME%\build-tools\29.0.2
Obviously the version number will change over time. Remember to close any CLI windows and re-open them to recognize the newly added path.

Unable to sign the android apk while using calabash

I am trying to use calabash tool for automation of android application, while signing application I got following error:
jarsigner error: java.lang.RuntimeException: keystore load:
C:\Users\pcadmin.INFPU08742\.keystore (The system cannot find the file specified)
I have debug.keystore file in ./android folder
Please let me know what is required?
How are you signing the apk? If it's through the terminal it can become quite a huge mess. At least that happened to me. A quick solution is simply to get the signed apk from eclipse -> right click on Application package(in package explorer) -> Android tools -> Export Signed apk. Just specify the keystore location and use android as password. That should do the trick.

debug.Keystore format file i try to open it using notepad?

I am developing gps base app. For that i need the md5 so i have tried to open the file debug.keystore using notepad,so file format is change to notepad, now i have got the google-apiKey using key-tool menu (install plug-in keytool ), but problem is that when run my app it give me the following error
Error generating final archive: java.io.IOException: Invalid keystore format Unknown Android Packaging Problem
I am not even sure where to begin to look. I cannot launch the application. Can someone give me an idea on what area I can look into?
A
I am solve this problem
Delete your debug certificate under ~/.android/debug.keystore on Linux and Mac OS X; the directory is something like %USERPROFILE%/.androidon Windows.
The Eclipse plug-in should then generate a new certificate when you next try to build a debug package. You may need to clean and then build to generate the certificate.
Your debug keystore was created automatically

Categories

Resources