[ERROR] Failed installing ....... pkg: /data/local/tmp/app.apk

You must Login before you can answer or comment on any questions.

Hello guys,

I just installed the mobile development environment on my Linux laptop. Everything seems to be working properly for new projects, but trying to run the Kitchen Sink app on the Android emulator, always gives me a "failed installing" error. I have tried creating a new project and copying over the Resources folder, but didn't work.

Any comments or ideas?

R. Alcocer

22 Answers

Here is all that I had to do to get things working consistently :

  1. Delete all AVD's

  2. Insure that you have the following Installed Packages (others may be ok, but I paired it down to only these)

    • Android SDK Tools, revision 10
    • Android SDK Platform-tools, revision 3
    • SDK Platform Android 2.2, API 8, revision 2
    • SDK Platform Android 2.1-update1, API 7, revision 2
    • SDK Platform Android 1.6, API 4, revision 3
    • Google APIs by Google Inc., Android API 8, revision 2
    • Google APIs by Google Inc., Android API 7, revision 1
    • Google APIs by Google Inc., Android API 4, revision 2
    • Google Market Licensing package, revision 1
  3. Now, from Titanium Developer, under "Run Emulator > Android" click "Launch"

  4. This is very likely fail, but it will create an AVD baseline for you to modify

  5. Go back the the AVD Manager, refresh the list of Virutal Devices and you should now see something like: "titanium_1_HVG...."

  6. Edit the AVD, make sure that the Target is "Google APIs (Google Inc.) - API Level 8

  7. Note, I used WQVGA400 but I think others will work ... the key was to use the Google APIs not the Android 2.2 target.

Now, return to the Titanium Developer and you should be able to launch and see it run.

— answered 1 year ago by Rodney Aiglstorfer
answer permalink
6 Comments
  • Updating the installed packages did the trick for me as well!

    — commented 1 year ago by Andrew Hunt

  • The key for me was point number 6. To select a Google API (I had others). I needed to create a new one for 2.2 in the SDK Manager.

    — commented 1 year ago by Matt Bourne

  • I tried following all these steps and still get the same error in this log http://www.pastie.org/2149420 Anyone else got any ideas?

    — commented 11 months ago by Matthew ORiordan

  • Show 3 more comments

If you see [INSTALL_FAILED_MISSING_SHARED_LIBRARY] in the log it means you're not using the right Emulator. You must use a Google APIs emulator image. Those are designated as "Api X.X" on the Android test and launch screen.

— answered 2 years ago by Don Thorp
answer permalink
3 Comments
  • I just had to change in Eclipse Run configuration of the Kitchen Sink: [Android API: Google APIs Android 2.2] (I had 2.3.3 by default)

    — commented 4 months ago by Bulat Yaminov

  • I have also changed the configuration of kitchen sink to [Android API: Google APIs Android 2.2] but not have success :( please help

    — commented 3 months ago by Mujaffar S

  • Finaly kitchen sink application is worked for me

    I have created an another project and added the required js files one by one

    Note: The js files for geolocation or map is commented

    If not working then find the js and comment them which are requiring the internet connection

    — commented 3 months ago by Mujaffar S

It needs to run on SDK with "API x.x" (Select before you click the launch button).

Ex:

APIs 1.6,

APIs 2.2,

APIs 2.3,

It's working!

I experienced this issue after moving the android SDK after installing the Android SDK and Appcelerator at an earlier date. For those in this situation....when re-installing the android sdk,

__don't forget to re-install the "Third Party Add-Ons" > Google API SDKs __ (Located under the Available Packages > Third Party Add-Ons > Google Inc add-ons

In Appcelerator VERIFY you have listings for 1.6 and APIs 1.6, 2.1 and APIs 2.1

both I forgot about this during the re-install, so the Google API SDK files were not available, and never selectable.

1/7/2011 - The configuration which worked for me (Titanium v 1.5.1) was APIs 1.6 AND Screen == WVGA854

I tried all the advice here and nothing works on Mac OSX 10.6.6 with Titanium 1.2.2

[ERROR] Failed installing com.appcelerator.titanium: pkg: /data/local/tmp/app.apk

No matter which API I choose, no matter if I delete all the emulators and choose API Level 8 Manually by editing the emulator I still get the same error.

The iPhone emulator compiles and runs "appcelerator-KitchenSink-c17b77f" just fine!

— answered 1 year ago by Andre Venter
answer permalink
1 Comment
  • Make sure that when you install all the Google APIs that you click the "accept all license agreements" radio button -- otherwise Eclipse will only install the parts that don't require licensing agreements (AdWords, Market Billing & Market Licensing). It gives you no warning that it didn't install all the APIs that you thought you installed. Since you're a Mac user, you're not used to that kind of unacceptably crappy interface design. ;)

    — commented 12 months ago by Jamie Ciocco

Ok, after much deliberation following the instructions from above this has now worked. The only thing to bear in mind is that I tried to set the API using "Run Configurations" within Titanium and that did not work. However, when set the API to a Google API (as opposed to Android API) from with AVD Manager (launched using executable android) then this error stopped appearing.

Thank you all for the help.

I had the same error and got it running by choosing the Android SDK "APIs 2.2"

I had to download that SDK using the Android download manager inside the Android plugin for eclipse

You should also make sure that you have python2.5 installed

Ubuntu lucid lynx doesn't officially support python2.5 so you have to install the unofficial python2.5 package from here https://launchpad.net/~fkrull/+archive/deadsnakes

This message now appears while building:

[ERROR] /opt/android-sdk/tools/apkbuilder /home/ralcocer/Desktop/Tecnologia Libre/My Titanium Apps/Mobile/KitchenSink/build/android/bin/classes.dex does not exists! [ERROR] /opt/android-sdk/tools/zipalign Unable to open '/home/ralcocer/Desktop/Tecnologia Libre/My Titanium Apps/Mobile/KitchenSink/build/android/bin/app.apk' as zip archive

HTH

R

It's working now. I didn't have the API 1.6. Downloaded all the available packages while I was there, and it's running now.

Thanks!

R

I'm getting a similar error, basically it says that classes.dex does not exist so I get a system error while compiling. Running on Windows though.

I've got the same problem. I've tried the "APIs 1.6 fix" and the "builder.py memory fix", but to no avail. Here's the trace I get (it's a little long, yes):

If you see [INSTALL_FAILED_MISSING_SHARED_LIBRARY] in the log it means you're not using the right Emulator. You must use a Google APIs emulator image. Those are designated as "Api X.X" on the Android test and launch screen.

Using DDMS i found that Memory allocated to application is get increases as i am navigating screen by screen and after some time it crash application with force close message/Fail to load resources. Even i have remove all objects from window and after that assign null to it. i.e window.remove(viewname); viewname=null; window.close(); window=null. Please help Me OUT.

Which emulator are you launching? It needs to be "API 1.6"

— answered 2 years ago by Don Thorp
answer permalink
2 Comments
  • many thanks i had no idea that chosing sdk "1.6" would behave completely diffferently to sdk "apis 1.6" or sdk "2.2" would behave completely differently to sdk "apis 2.2"

    — commented 1 year ago by clive darra

  • this worked for me.

    — commented 1 year ago by Rachel Jaro

Hello,

THe ones I have available are 1.6, 2.2 and APIs 2.2. All three give me the same error. I am downloading 2.1 API 7 right now to see if I see more options.

Anything else I should check?

Make sure you don't rename the KitchenSink project's directory. It needs to be the same name as in GitHub. A fix for that should show up in 1.4.0

Don,

By folder you mean the actual KitchenSink folder? What I did was to download the whole KitchenSink package, went to 1.3.x grabbed the KitchenSink folder that resided in there, and moved it to my local development folder.

R

That installation error is referring to Maps. You must run Kitchen Sink on an emulator that starts with Api e.g. "Api 1.6"

Hello,

I think I'm getting closer to get this to work. When the process stops, now it says:

[ERROR] Failed installing com.nolanwright.kitchensink: pkg: /data/local/tmp/app.apk [TRACE] Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]

Full trace for the building process is at https://gist.github.com/gists/9b68bcd784500a32e7ac/download

Does anyone know what "shared library" it refers to?

-R

Your Answer

Think you can help? Login to answer this question!