1

i am using mobilefirst platform for hybrid application development.

I created an application in and created .apk file of this application:
Generated Android project folder -> Android tools -> Export unassigned application

I then copied this apk file to android device and try to install this .apk file. At this time its showing Application not installed.

It's properly working in simulator and browser.
What is the issue here?

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Team
  • 347
  • 1
  • 5
  • 16
  • There are some answers for the same error message in this other so answer in case you haven't read it yet - http://stackoverflow.com/questions/4226132/application-not-installed-error-on-android – Leandro David Dec 29 '14 at 13:12
  • Provide LogCat output from the installation time period. – Idan Adar Dec 29 '14 at 13:55
  • Also, did you try to simply select "run on android device" instead of export the apk? does it work? – Idan Adar Dec 29 '14 at 13:56
  • I just do the "run on android device" that's working fine. But the export .apk file installation is not working on android device. – Team Dec 30 '14 at 06:09

2 Answers2

0

Did you try with a Signed application package rather than an Unsigned application package?

It could be that in your device settings (under Security) you have not allowed to install applications from Unknown Sources.

  1. Enable support for Unknown Sources
  2. Try again with an unsigned package

When you select Run As > Run on Android device", the application gets signed with the debug keystore supplied by Android, so it's still a "signed" package.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I didn't tried with Signed application package.I just tried with Unsigned application package. And also I enabled Support for unknown sources but its still showing "Application not installed". – Team Dec 30 '14 at 06:56
0

The problem you are facing is due to the fact that you have exported an unsigned application, which is not intended for distribution purposes. Try Exporting a signed application package, by following one of the following steps :

  1. "Right click project -> Export -> Export Android Application"
  2. "Right click project -> Android Tools -> Export Signed Application Package"

Both of the above methods will export a signed application file, used for distribution purposes.

You may also test your app on a real device by just connecting your device to the testing machine via a USB cable and then following step below :

Right Click on your Project root -> Go to Run As -> Select Android Application -> Now a popup is shown with all the active devices -> Select your device from the list

**

Newbie Guide to Export Signed Application and configuring keystore file in Eclipse :

  1. "Right click project -> Android Tools -> Export Signed Application Package"
  2. A popup as shown below would appear, if your project won't contains any erros :

enter image description here

  1. Click Next
  2. On clicking Next, you'll get a screen as shown below :

enter image description here

5.On this screen, make sure Create new keystore is checked.
6.Browse to the location, you want to create a new keystore at, and also add a password to access it later.
7.Then Click Next
8.On clicking next you'll get a screen as shown below :

enter image description here

9.Fill all the fields in this screen, (ONLY first five are mandatory), In validity fill the number of years this key would be valid for, then click Next.
10.On clicking Next you'll get a screen as shown below :

enter image description here

11.Browse to the location you want to keep for apk file in, and Click Finish, and you are done!

Hope this helps!

gsanskar
  • 673
  • 5
  • 10
  • Via USB cable its working perfectly!. Signed application package needs keystore. I am not familiar to configure the keystore for signed package... – Team Dec 30 '14 at 08:12
  • Let me know if you want to know anything else! – gsanskar Dec 30 '14 at 08:43
  • I just give the location for new keystore and password but the next or finish button is not come to active.It needs any app store credential or something like that – Team Dec 30 '14 at 09:01
  • As I said in step 6, you will need to create a new password for your keystore as well as alias! – gsanskar Dec 30 '14 at 09:02
  • I just export through the signed package that resolve my issue !! – Team Dec 30 '14 at 09:22