getting error msg install failed missing shared library - android

i have made one application which uses google maps APi,i am using titanium 1.2.2 and mobile sdk 1.5.1 for android,wenever i am trying to run the app on emulator,console shows an error
[INSTALL_FAILED_MISSING_SHARED_LIBRARY]
what does this error means and how to fix it??

I had the same issue. Make sure you have changed the target from Android### to Google APIs in the AVD Manager.
Open Android SDK Manager
Select Tools -> Manage AVDs
Select a/the virtual device and click edit
In the target Select Google APIs...
If this target does not exist in the list, you need to install the Google APIs for the Level you require.
This will appear in the check list under the desired Level in the Android SDK Manager. Once this is installed (go grab yourself a coffee, it can take some time), repeat steps 1 - 4.

You can add android:required="false" flag to your manifest file and the application should be able to start.
<uses-library
android:name="com.google.android.maps"
android:required="false"/>
Then you have to make sure to protect your code from throwing an exception in places where you need it. You can try something like this to check if library is present:
Class.forName("com.google.android.maps");

run android.exe or android.sh utility this will bring up the program to install android SDk. Go to third party add-ons and select Google Api's. After they have been deployed/installed. Please make sure to re-start adb. If you are prompted for a restart of adb. Please say yes.

You have to add
<uses-library android:name="com.google.android.maps" />
between the <application> </application>
Tags of the Manifest.

This happens when your application requires a library that you either haven't included or your device doesn't have it.
Make sure you're using the Google API for Google Maps.

The usual suggestion to ensure you are running against a Google APIs android SDK is correct.
However, there is also a bug if you are using Titanium Studio whereby updating the SDK version in Titanium does not update the SDK in the actual android AVD. You will need to open the Android SDK Manager (SDK Manager.exe or SDK Setup.exe), select "Virtual Devices" on the left and then edit all appropriate devices to set their 'Target' to the desired SDK.

I also came across this same problem and followed #CraigS steps but it didnt help.I was working on the emulator.
Then i tried uninstalling the app from the emulator and running the project again. It installed successfully. Just try this also if CraigS method doesn't help. :)

Related

How to install older Android SDK in Eclipse

I'm working at the moment at a simple app in eclipse for android. Just receiving and sending data, and using the camera API.
I've set the minSDKversion to 8, because I think that has the widest user base. But at the beginning of the project eclipse was asking me which target SDK version I would use, and because I had just one installed (the latest 4.0.3) I've took this.
Now I'm asking me if it wouldn't be wiser to install a lower SDK, like Android 2.2, because it would be not that big (compared to the 4.0.3) and my app would not have included all the fancy new features, which are not used in any way?! Or is this complete nonsense I'm talking here, and just should take my 4.0.3 SDK? When not, how can I install a lower version? Help -> SDK Manager is not showing old SDKs...
Here is a very helpful link that will probably answer your question: http://developer.android.com/sdk/installing/adding-packages.html
Basically, open up the Android SDK manager and it should give you a list of packages that you can install! From there you can choose old SDKs!
hey i faced the same issue as yours
usually while updating due to this error , it is unable to fetch the older SDKs
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list.xml, reason: File not found
This is how you can fix it :
1) Go to Window > AndroidSDK Manager
2) select tools> options
3) set the proxy (if u r sitting behind proxy)
4) in checkboxes check Obsolete option (in Android SDK Manager)
5) go to Packages > reload (in Android SDK Manager)
This worked for me
In case you are using windows7 .
Go to Android SDK Manager location > right click > Run as Administrator
Best Regards,
Ashwani kumar
I was having a problem with this also. I tried all of the things listed in the other answers here and nothing worked. I went into Tools/Options (in the Android SDK Manager) and checked "Force https:// sources to be fetched using http://" and reloaded and the older APIs magically appeared.
if u want minSDKversion from its maxSDKversion
1.select maxSDKversion and delete all old pakages .
2. after doing it sdk manager will show all its older versions .
3. select required version and install all packages again.
:) :)
it worked for me .. just try .

Source developed using Android 2.3.3 google Apis does not work for Android 4.0.3

I developer an Android app using Android 2.3.3 Google apis . The same source I tried to build again using Android 4.0.3 Google apis. But when I try to run the app the console is showing error as "Failed to install Shared Library" "Check LogCat for more details". When checked in "Logcat" its showing error as unable to find com.google.android.maps .Can anyone help me in sorting out this issue.
for eclipse you have to install GOOGle maps api seprately for each version might be your eclipse have Google Map api for 2.3 but not for 4.0
You might forgot to add librery in your mainfest file.
add the following code within mainfest file( Inside Appication tag)
<uses-library android:name="com.google.android.maps" />
Library management changed from r17. If you updated your ADT to this version or higher try this:
Right click project > Properties > Java Build > Order and Export
Move your libraries to the top

Cannot Find Google APIs for Android SDK

I've been trying to create an application that uses Google Maps and upon getting an error for "MapActivity" I searched the web and found the solution was to make my build target "Google APIs".
However, I looked in the "Android SDK and AVD Manager" in Eclipse, I could find it anywhere :(
I looked under "Third part Add-ons">"Google Inc" but it simply says "No packages found".
Any help, please?
I encountered the same problem
Go here to manually download the Google APIs.
For example, I use GoogleAPI level 8, so I download the package here
After downloading just extract the zip file to "C:\Program Files (x86)\Android\android-sdk\add-ons" and rename the directory to "google_apis-8" instead of "google_apis-8_r02".
This happened to me.
The simple fix was to update currently installed packages, which in turn updated the SDK Manager app, then after restarting, every appeared including the USB drivers.
Apparently, if the SD Manager is outdated, then you won't be able to install important thing like the USB driver.
If you're using the latest version of the SDK (ADK 14), the Google API packages should be located in the folder containing the appropriate SDK level in the SDK manager.
For example, for Android 2.2, there should be a folder called "Android 2.2 (API 8)" which should contain the SDK "SDK Platform" and additional pieces such as the Google APIs "Google APIs by Google, Inc.".
I met the same problem and it said "access is denied".
I am using 64bit win7 and the sdk tools is installed under C:\Program Files (x86)\Android\android-sdk.
I figure out that it is because the SDK manager does not have permission to the folder so the quick fix is to right click SDK manager and run it as administrator.
I found that working with the Motorola Development studio made things very easy to pick up various API levels from Google. You can find all of the download and documentation at
developer.motorola.com
Sometimes Google Server is down or return 502 error, so you cannot find any manifest file. This happened to me. The solution is to wait for a couple of minutes.
Run as Administrator did the trick from me in Windows7. SDK mgr is showing all extra google apis too after this.
I faced the same problem.
Restarting the Eclipse & SDK manager solved the problem. After Restart, all the GOOGLE API and other stuff are visible under the respective Build.
If this dont show any change, Invoke the SDK Manager.exe as ADMINISTRATOR and this will solve the problem
Try clearing your cache (Tools > Options > Clear Cache), then
reloading (Packages > Reload), and see if that helps.
If it is an old package it is possible that it is obsolete and the SDK manager wont show it by default. Go to "Packages" Tab and select "Show Obsolete Packages".
Reinstalling SDK manager and ADT solved the problem.

Eclipse New class , MapActivity not found !

I want to create new class MapActivity from Eclipse.
I go File-> New -> Class on Superclass-> Browse, and when I type MapActivity there is no results.
In Windows-> Android SDK and AVD Manager there is no new updates, I have installed SDK from version 1.5 to 2.2
Can some one help me with this?
Thanks
You need to select GoogleAPI by Google Inc package installed , create an AVD profile using the same and then use map activity..This should help you ...
The steps Ravi mentioned are necessary, but to get things working in your existing eclipse project, without creating a new one, change the build target:
Project Properties->Android->Google APIs (x)
Make sure you have the "Google APIs by Google Inc." package installed for the API version you're using. MapActivity isn't included in the standard Android API.
1) Make sure you build target has Google APIs included. In eclipse this is done in project properties in the android menu.
2) If using emulator - the AVD must also target an api with Google APIs included.
3) Add <uses-library android:name="com.google.android.maps" /> as child (inside) the application-tag in your manifest.
If you are using eclipse id, then click on AVD Manager and then it will show you the list of installed as well as un-installed packages. Select Google api packages and click on install. Then you will not this problem.
See the details

Shared library missing in android.

02-18 00:02:08.432: ERROR/PackageManager(57): Package com.example.brown requires unavailable shared library com.google.android.maps; failing!
I got this exception in logcat.
Can anyone guide me?
As CommonsWare said, your emulator is missing the library. The Google Maps Library's documentation's Overview page has info on how to create the right kind of virtual device for the emulator. The gist is:
Launch the AVD Manager by using the android command without any options. If you are developing in Eclipse/ADT, you can also access the tool from Window > Android SDK and AVD Manager.
Click the "New" button to begin creating a new AVD.
In the dialog that appears, specify a name for the AVD and select the system image target that you want the AVD to use. Select one of the "Google APIs (Google Inc.)" targets, making sure to choose a version whose API Level matches the android:minSdkVersion attribute in your application's manifest, as described above.
Configure the other options and then click "Create AVD".
Once you've finished creating the AVD, you can run it from the AVD Manager UI or you can use the emulator's command-line interface. If you are developing in Eclipse, you can configure a Run Configuration to start the AVD and install your application on it.
For more information about AVDs, see Android Virtual Devices on the Android Developers site.
I had the similar problem on a real device. After a loot of googling I found this answer
fixing missing shared library. It turns out that on some custom roms the comp.google.android.map library is missing, you have to install it manually.
download googleapps
extract two files
system/etc/permissions/com.google.android.maps.xml
system/framework/com.google.android.maps.jar
remount the /system filesystem rw (mount -o rw,remount /system)
copy the files in
do a chmod 644 on them
reboot
This error occurred to me on an actual device, not an AVD like the other answers. In my case I was running on a Nexus S with a custom ROM that did not have Google Maps installed.
I have read elsewhere that the com.google.android.maps shared library is bundled with the ROM itself and is not bundled as part of an APK.
Therefore the solution for me was to revert to the stock ROM which had Google Maps installed.
BTW, the title of this thread refers to an error that is found in the DDMS LogCat. The first error most users will see (before checking LogCat) will be in the console of Eclipse:
Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
Please check logcat output for more details.
Your emulator is missing the Google APIs. Create a new AVD that contains the Google APIs, and this error should go away.
As jfritz42 I got this error on a real device with a custom ROM (Cyanogenmod). The error was caused by the fact that I did not install the Google Apps package, since it contains a lot of apps that just annoy me. However, there is a solution how to install the google.maps library without massing up your system with the 19 Google Apps in this package. Just download the package (zip file) and remove all .apk files from system/app in this zip. Afterwards, you can install the zip by using the ROM Manager or via the recovery mode. Then you should have the maps library installed on your system. The Google Apps included in this package (e.g. the Maps app) can be installed separately afterwards.
In case with real device try remove from manifest file:
<uses-library android:name="com.google.android.maps" />
I've experienced this error after the AVD was set up properly and working okay. The AVD was still using the Google APIs and I could see the reference to the maps library in Eclipse. The only way I found to resolve this was to delete the AVD and create a new one, as advised by fiXedd.
fiXedd (see above) is correct.
You can edit devices you have already created or create a new one. When you create or edit a device inside the AVD Manager, instead of selecting this kind of version target:
Android x.x.x - API Level x
Simply use this kind instead:
Google APIs (Google Inc.) - API Level x

Categories

Resources