* EDIT 1 *
Of course, just after I posted i tried to uninstall the app, and then reinstall it from APK. Then it worked. Maybe its the fact that I usually install it from Eclipse that is the bad thing here? Testing
/EDIT
So I am having the problem that my fine APK-files wont install om my device.
I found another who had the same problem, and solved it by self-signing:
unsigned APK can not be installed
However, I always tried with a signed APK. In Eclipse, I choose "Export" and then I have to first choose and "log in to" my keystore, then choose a key and again supply my password, and then choose the location for the file, and press "Finish".
This is the last "page" in the wizard:
After I copy that APK-file to my device, and then "run it" from the file explorer, the Install-screen shows upp and looks OK. First I get the "Replace application"-screen, asking me if I want to replace the existing version. I press "OK". Then it asks me if I want to allow the application to ... yada yada. I press "Install". After a brief message saying "Installing" I get the message:
Application not installed
with a green "check" to the left of it.
No other error messages.
I have checked the box "Unknown sources". I might add that there are no problems when I launch the same app from Eclipse!
Any tips and ideas would be appreciated.
If the two .apks have different signatures (Eclipse uses a debug certificate), you will not be able to install/update with the new .apk without removing the previous one.
You can find more information about this here.
The problem seems to be that I first installed the app via Eclipse (launching/debugging from Eclipse).
When the app was installed that way, and I then tried to reinstall from APK, it didn't work.
However, if I completely uninstalled the app first, then reinstalled from APK-file the installation was successful. It was also possible to reinstall (with an updated APK) after that!
I also encountered this issue.
Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It resolved my problem.
Try to not install your application via Eclipse. If you want to avoid situation when after update you have message "Application is not installed". Install application. Install only using export as apk options.
create keystore file through command line
keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore
export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.
this will crate signed apk at the same time apk will be zipaligned. And installable.
If you go through command line for all, some times you may face "Application not installed" error.
(Application not installed error can happen not only, when using command line. It can be some other reasons as well)
You can run into this problem if you sign your APK on a machine running JDK 7. Downgrading to JDK 6 fixes the problem.
Related
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)
I have an apk that runs perfectly fine on emulator and on real devices, however this is an unsigned APK. When releasing to the android store you need a signed apk, I have tried in eclipse doing:
Project->Android Tools->Export Signed Application Pacakge
Then I go through the whole wizard create my keystore and everything else and get a signed APK when it is done, however this APK crashes on startup on all devices I have tested. Normally I would look in the console and see what is breaking / not working but when you go through the eclipse wizard the console does not change.
Is there a different way to do this? what could be happening in the signing process that causes it to crash on startup? Thanks for any info.
Edit
I found the answer to my issue so if anyone else has this problem this is what worked for me. I was using ANT to build my APK, if you go to Project->android Tools->Export Signed package etc it does NOT use ant, any program did not work, to fix this drag the build.xml icon to the top right ANT corner, this brings up a list of ANT functions, then run BUILD apk rather then DEBUG APK (the default) after this you get an unsigned apk, you can then sign it and align it and it works great#!
This happened to me a lot in Eclipse when i had many different libraries and dependencies in my project.
Try to disable Project/Build Automatically before you are exporting your apk.
NB: dont forget to turn Build automatically back on after the export.
when I updated my android app i got the following error message:
Re-installation failed due to different application signatures.
You must perform a full uninstall of the application. WARNING: This will remove the application data!
Please execute 'adb **' in a shell.
Launch canceled!
I personally got no problems with that but my question now is ... if I export the apk with the same keystore I used for previous updates. Is the app update a simple download for my users ?
Or will they have any problems with it ?
Btw: I didnt format my computer or changed anything about my eclipse folder or my folder where I save my keystore etc.
Thanks in advance!
Greets
Is the app update a simple download for my users ?
Only if it was signed by the same production signing key as you used originally, which would not appear to be the case here.
I didnt format my computer or changed anything about my eclipse folder or my folder where I save my keystore etc.
Despite that, you attempted to update an APK with one signed by a different signing key (e.g., debug vs. production). Use jarsigner -verify -verbose -certs ..., where ... is the path to your APK, to dump signing information, so you can compare your old APK to your new one.
I have been developing for android for a while, and have never encountered the following problem.
I inherited a codebase that I am trying to move from hockey app to google play. When I distribute the apk obtained from the bin directory, everything works fine. However, when I export a signed apk, the app crashes claiming that one or another class is not found. The classes in question are classes that I create myself. And they are in the main package; so no dependency issues that I can see.
Has anyone encountered this type of problem where bin apk works fine but not the signed apk? I am not using proguard. And I am using exclipse to export this app; similar to how I have always exported other apps.
The problem cannot be the key used to signed. As far as I know, if the key were corrupted, it would not create the apk at all.
The problem persists whether I email the apks or install them with USB.
Try:
1) Remove bin folder.
2) Rebuild project.[Eclipse will rebuild if 'Build automatically' is checked under 'Project' menu tab]
3) Now try creating signed apk.
I am facing this problem once in a while. I have been successful with above steps. If still problem persists, I will restart eclipse then follow same steps again.
Things to know:
I'm kinda new to programming
I have installed Eclipse with the Android platform loaded on my Macbook Pro
I have 2 PCs as well for further troubleshooting and flexibility
I commissioned a developer to port an iOS app to the Android platform. I did not build the app myself, I paid to have other people do it. I was able to run the avd and emulator and install/uninstall/reinstall with success through the adb protocol. Now I'm on to sign the APK for release in the Android Marketplace, except that's where I'm stuck. I have attempted and researched the hell out of this to no avail. I think the issue I'm running into is the materials I find are outdated.
Methods I've tried:
Using command prompt on my PC, I used the keytool command via the instructions here and was able to get through the first half, but when prompted for the second half I kept getting "cannot find jvm.dll". This guy had a similar issue, but no instructions on how to solve it, which he did apparently. NOTE: I did not find jarsigner.exe in ANYWHERE on any of my computers. I downloaded it from a website. Could be corrupt or invalid I suppose. Could never get a signed APK.
I found "signapk.rar" from this site and it actually seemed to work. I followed the instructions to a T and it produced the signed APK like it was supposed to. The problem was when I attempted to upload it, the Marketplace told me it expired before the 2033 date, whatever that was. So I assume that the code in this program had a validity entry that was large enough. I don't know how to change that, if that is the issue.
I came across Portecle just yesterday and was able to create a keystore and a certificate. I know where they are in my directory, but I don't know how to use that to sign the APK. It's terribly confusing.
Signing in Eclipse. This is the least successful method because I can't for the life of me figure out how to work the damn thing. I know I can't just 'import apk' and it work like magic, but that'd be great if it did. I created a new project and imported the file system after changing my APK to a ZIP. One time it imported the manifest and the other time it didn't do anything. I'm certain it's user error.
I understand if this were an easy process, everybody could be a developer. That's obviously not the case, so I'm trying to figure it out on my own while my developer is out of the country. Any and all help is appreciated.
Assumptions:
Assuming you have the keystore (private key to sign the apk) already generated by you.You can use the command line to do the signing without eclipse or android studio if the yourApp-unsigned.apk is already generated by your vendor or you
You are Using Windows for the below steps
Signing the apk:
Add the path for your jdk bin to your system variables (if you don't know how to do, that look for it its easy search for how to add path to windows system variables)
This is my jdk path (use yours)
C:\Program Files\Java\jdk1.8.0_25\bin
open Command Line and type the below using your App apk and keystore key
jarsigner -verbose -keystore c:\users\android\myAppKeyStore.keystore
c:\users\blabla\Desktops\myAppAPK.apk my_keystore_alias
if success, it will promote you to enter key phrase/password of your private key (the one used for your private key generation which you should know)
Verify it was signed Successfully using the command line
jarsigner -verify c:\users\blabla\Desktops\myAppSignedAPK.apk