3

* 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:

enter image description here

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.

Community
  • 1
  • 1
Ted
  • 19,727
  • 35
  • 96
  • 154

6 Answers6

7

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.

Che Jami
  • 5,151
  • 2
  • 21
  • 18
  • 1
    Even though I answered my own question before you did, I'll give you the answer as it indeed is correct ;-) – Ted Oct 22 '11 at 08:42
3

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!

halfer
  • 19,824
  • 17
  • 99
  • 186
Ted
  • 19,727
  • 35
  • 96
  • 154
  • Of course you can't install APK signed by final key (APK created via `Export` in Eclipse) over already installed APK with the same name signed by debug key (when you are running the project from Eclipse). And vise versa. The keys are simply different and Android complains about that. – GrAnd Oct 21 '11 at 16:00
  • 2
    Actually, Android didnt complain very much. It said "not installed" and thats it. Not very clear... – Ted Oct 22 '11 at 08:41
1

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.

joepadz
  • 91
  • 1
0

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.

Paweł
  • 1
0

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)

0

You can run into this problem if you sign your APK on a machine running JDK 7. Downgrading to JDK 6 fixes the problem.

Zenadix
  • 15,291
  • 4
  • 26
  • 41