1

I am using Google Play services for authentication in my android app. The project was running perfectly fine until an update in Google play services. After I did the updates, the project is not running. I am getting the following error in the console,

[2013-04-29 13:05:08 - Opine] Android Launch!
[2013-04-29 13:05:08 - Opine] adb is running normally.
[2013-04-29 13:05:08 - Opine] Performing package-name.MainActivity activity launch
[2013-04-29 13:05:08 - Opine] Automatic Target Mode: using device 'my-dev'
[2013-04-29 13:05:08 - Opine] Uploading my-app.apk onto device 'my-dev'
[2013-04-29 13:05:08 - Opine] Installing my-app.apk...
[2013-04-29 13:05:21 - Opine] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2013-04-29 13:05:21 - Opine] Please check logcat output for more details.
[2013-04-29 13:05:21 - Opine] Launch canceled!

and I'm getting the following error on

04-29 13:05:56.054: E/PackageManager(330): Package package-name requires unavailable shared library com.google.android.gms.auth; failing!

I Googled the error, but failed to find anything helpful. Others are getting the same error for maps API. It is described here. I even tried reading the Google Play Services Manual but again it didn't work. So then I found tried including the JAR file in the build path. Still didn't help.

I am trying to run on Galaxy Y, android 2.6 (unrooted) and Nexus S, android 4.2 (rooted). I do have Google play services, so that's not the mistake.

And now I gave up and started everything from scratch i.e. formatted my laptop, installed a completely different OS and manually copy pasted each and every file. But it still didn't help...

Please someone try and help me...Pleaseeeeee....

Community
  • 1
  • 1
Aaswad Satpute
  • 794
  • 8
  • 34

3 Answers3

1

Just remove the uses-library tag from your AndroidManifest.xml ....

sheetal_158
  • 7,391
  • 6
  • 27
  • 44
0

Instead of adding a reference library directly from the SDK path, import the project from the SDK into your project workspace.

Project Explorer > Import > Android > Existing Android code into workspace.

In the root directory, enter the path for the Google Play Services Lib. I'm assuming that is the one you want. For this library, your path would contain : /sdk/extras/google

Projects section would have a list of all projects in this path, check the google-play-services_lib and hit Finish.

Now right click on your Android project, select properties. Under Android, first delete your current reference, the one that is giving you a cross next to it right now.

Then select Add. You should get the newly referenced library mentioned in the Project Selection window. Hit OK and Apply.

Clean the project once if just this much didn't work.

-1

It causes because of your settings of the project. So follow the steps given in the Android Developer site.

As per the Developer site:

To install the Google Play services SDK for development:

  1. Launch the SDK Manager. ◦From Eclipse (with ADT), select Window > Android SDK Manager.

    • On Windows, double-click the SDK Manager.exe file at the root of the Android SDK directory.
    • On Mac or Linux, open a terminal and navigate to the tools/ directory in the Android SDK, then execute android sdk.
  2. Scroll to the bottom of the package list, select Extras > Google Play services, and install it.

    The Google Play services SDK is saved in your Android SDK environment at <android-sdk-folder>/extras/google/google_play_services/.

  3. Copy the <android-sdk-folder>/extras/google/google_play_services/libproject/google-play-services_lib library project into the source tree where you maintain your Android app projects.

    If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

To set up a project to use the Google Play services SDK:

  1. Reference the library project in your Android project. See the Referencing a Library Project for Eclipse or Referencing a Library Project on the Command Line for more information on how to do this.

    Note: You should be referencing a copy of the library that you copied to your source tree—you should not reference the library from the Android SDK directory.

  2. If you are using ProGuard, add the following lines in the <project_directory>/proguard-project.txt file to prevent ProGuard from stripping away required classes: -keep class * extends java.util.ListResourceBundle { protected Object[][] getContents();}

halfer
  • 19,824
  • 17
  • 99
  • 186
Praveen
  • 90,477
  • 74
  • 177
  • 219
  • Tried it too but it didn't help...:( when i try to import the library it shows a cross...wait I'll rather edit me question please try and help me if possible – Aaswad Satpute Apr 27 '13 at 04:27