Using Xamarin, I'm rebuilding an app (on Win10). After the build completes, I right click on the Archive link in the Solution list. A new version is created. Then I click on Distribute, then Ad Hoc. Then click Save As and the APK is saved. BUT sometimes it doesn't ask me for the password. Then I copy it to the Android Download folder. Then I go to the Android device and click on the file. Mostly, it installs, but now it says "App not installed as package appears invalid."
How to fix this or how to further diagnose it?
Thanks.
RON
apk won't be installed if isn't signed with any key, which is done in runtime during debug run, and when producing public APK you need to point on some keystore and enter its password
if you need to put some password when producing APK and this APK won't install only when your IDE didn't asked for this password - you probably produced not-signed-with-any-key APK. thats some problem in IDE, I can't help with that, but there are possibilities for "manual" signing APK and inspecting keys, which were used for signing APK (some referal)
Related
I recently made my first app in Android Studio and made it into an APK. Google play said I had the wrong signature for the APK but I don't know how to change the APK with different signatures nor revert the program back in order to manually change it inside Android Studio. Any help on this?
Here is step by step what I did to get to this point. I finished writing my program and went to "build" then "generate signed apks" where I went through the process of making the keys, key store etc. At this point everything is fine. I just need to somehow go back into the apk and either change the signatures of it or unpack the apk in studio and redo the process of generating signed apks.
You need to sign the apk with the same public-key certificate which you use in the previous uploaded apk. When you build the release apk via Build -> Generate Signed Apk.., you will be presented with the following dialog:
Then you must use the same certificate file (something like android.jks) for the Key store path.
The documentation says:
Every app must use the same certificate throughout its lifespan in
order for users to be able to install new versions as updates to the
app. For more about the benefits of using the same certificate for all
your apps throughout their lifespans, see Signing Considerations
below.
So, if you lose the certificate file, there is no way you can upload the apk with the same package name again. It will lose forever, gone. You also can't delete the published apk to reuse the same package name again.
I upgraded my Android studio to 1.4. Now when I'm deploying my app to my device I get the message that the device has an application with the same package but a different signature. How is this possible? I already did some research and I looked up my debug.keystore, but this hasn't changed since 13/03/2015. Anyone has any idea how I can fix this?
The problem is the keys that have been used to sign the APKs, by default if you are running directly from your IDE and opening your Emulator, the APK installed in the Emulator is signed with your debug-key(usually installed in ~/.android/debug.keystore), so if the previous APK was signed with a different key other than the one you are currently using you will always get the signatures conflict, in order to fix it, make sure you are using the very same key to sign both APKs, even if the previous APK was signed with a debug-key from another SDK, the keys will definitely be different.
Also if you don't know exactly what key was used before to sign the apk and yet you want to install the new version of your app, you can just uninstall the previous application and reinstall the new one.
for more info go through This
Hope this Helps...
Debug builds are signed with the SDK keystore which is generated when you install the Android SDK. On Linux / OSX it is located at ~/.android/debug.keystore.
The message you had means that you have a debug build installed and you want to install an App Store build on it (or the other way around).
This can also happen when you deploy from a different machine.
i'm new to android development i have developed one application and distribute a copy from bin folder not in playstore . The user try to install app second time with different version it's giving "APP not installed an existing package by the same name with a conflicting signature is already installed" like this but same version it's not coming like this.
I want to install app without uninstalling(means user don't want to do uninstall) previous one without using play store and one more doubt when this signature will generates .
Thanks in Advance.
See what happens: most probably you'd compiled a DEBUG version of app and distributed it your own way. At that time your IDE used a debug certificate which is auto created every time you install IDE/SDK. Now, some time has passed and you'd switched your working PC/notebook OR you'd reinstalled the IDE/SDK OR you'd switched lets say from Eclipse to AndroidStudio OR changed your OS from Win7 to Win8 or Ubuntu, no matter what you did but as a result the brand NEW debug certificate was generated and used now. And most probably you'd lost your previous debug certificate 4ever (depends how this happens).
The certificate itself stands for a unique fingerprint and each debug or release certificate has its own unique fingerprint. That fingerprint is the signature Android talking about. Every apk is signed using certificate and has its signature, its mandatory.
So, since you are using a different debug key store certificate you are NOT ABLE to do what you want. The right scenario is to create a release certificate (key store) and to sign you app with it and then distribute app any way you want. This way you should also save your release certificate and reuse it later to sign any upcoming updates.
As for now you should restore your certificate you'd signed your apk with or the only way your users has now is to uninstall and then install.
Harsha Vardhan is right, You should first clean project and then use same signature with installed apk.
what ever you said it's correct but the problem here is i have changed sdk because of this problem is occurred . I think solution is need to generate apk file from same sdk .
I am not sure why that just happened.
But that's happened to me one time also.
I've changed my package name from com.aashakil.myapp to com.myapp and it was fixed.
If you change yours it'll may work.
I have created a signed .apk file and I've followed all of the steps (Created Keystore,Password and validity yrs,etc...) and I have an .apk file.
When I install this to any mobile device, it shows the installation failed, so I checked the apk file.
It contains only
META-INF Folder
classes.dex.
I'm unable to find the other files. This is the first time I'm facing this issue.
Does anyone know what may cause this?
Installing a production release over a debug release and vice versa will cause a failed installation.
Uninstall the current version first.
Keystore signed versions can be installed on top of each other.
Debug signed versions can be installed on top of each other.
Debug and Keystore versions cannot be installed on top of each other.
i solved the issue.....some privilege issue...if i do the same thing as a super user in the same system everything works fine(Generated APK).
Thanks friends
I am working on a existing android project for my client. I have made some modification in his application. I am working on eclipse.
After sending the apk he installed it on his mobile but he has a complain that:
Current application failed install, even after it told me it was going to
overwrite my old application information. Please remember to change keystore.
Let me know how can I change the keystore using eclipse so that it will not fail to install on his mobile. Please explain.
Thanks,
Pravin
Every .apk file should be signed with a key(by installing the SDK, you get a debug key). A key is unique and the system will check the key of an apk file if such a package has been installed in the device, to see if the key is the same as the existed one. If the key doesn't match, the .apk file can't be installed, unless you uninstalled the original one.
Now, I think you may have several choices:
sign the apk with your own key and ask you client to uninstall the old one.
sign the apk with your own key and change the package name.
get your client's key and sign the apk with it.
For security reason, your client may not give his key to you. I think the best choice is to compile your project in release mode, and then ask your client to sign it with his private key. See here.
The default Keysotre used by Eclipse is in your Home-Directory in /.android/debug.keystore.
If you want to update an App both, the new and the old Apk have to be signed with the same key.
So you need to figure out which keystore your client used in the first place.
Please note that the debug.keystore is unique on every machine.