saylormic
saylormic

Reputation: 145

Android Dependencies references non existing library google-play-services_lib.jar

I've been having a terrible time trying to get a simple Map to appear in an app as shown on the Google Maps v2 documentation. Eclipse keeps saying:

The container 'Android Dependencies' references non existing library 'X:\Android Development\workspace\google-play-services_lib\bin\google-play-services_lib.jar'

I found a couple people on here that had the problem and I followed those steps with no luck. I have Google Play Services installed and I even uninstalled and reinstalled it. I have imported google-play-services_lib project into Eclipse and checked move to workspace.

Any help would be amazing as I cannot get this to work. I did check in the location and there isn't a file there, so I don't know why it is missing since I have installed Google Play Services.

Upvotes: 12

Views: 46007

Answers (12)

mikey
mikey

Reputation: 1313

I solved this by right clicking the google-play-services_lib and building the project. I 'deleted' it from the workspace and then re-added it, to make sure when I wasn't altering settings / hadn't changed anything important. This built successfully.

I then built my main application and it worked successfully.

I was getting strange path errors and android-9 resolution errors. But it seems to be working now.

Upvotes: 2

Gene
Gene

Reputation: 11285

In Eclipse. Right click on your project -> "Android Tools" -> "Fix Project Properties"

Upvotes: 0

pixel
pixel

Reputation: 10587

I had the same problem. In order to fix this, you must ensure that your project supports same version of android sdk that is specified in the google-play-services-lib. So, in my case, I have project that has Minimum Required SDK set to API15. So, once you have imported google-play-services-lib into your project following these steps here https://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject, make sure you open you see the google-play-services-lib in your Package Explorer in Eclipse. Expand it, right-click on it and select Properties. In the Project Build Target, make sure you check an SDK that is at least equal to Minimum Required SDK set in your project, in my case API15: enter image description here

Upvotes: 1

Sagar Sodah
Sagar Sodah

Reputation: 122

I simply re-imported google play services library project and it worked!

Upvotes: 1

Zar E Ahmer
Zar E Ahmer

Reputation: 34380

First of all right click on the Project and import google-play-services if exist otherwise follow the steps told by @yoah (import it under sdk->extra->google->google-play-service-libproject->google-play-services_lib) and if still the problem doesn't solve then there may be multiple problems with multiple solution..

Solutions.

  1. Restart eclipse
  2. Clean the Project
  3. upgrade google-play-services
  4. Installing the new Build Tools did the trick. They were not automatically included when I updated the SDK
  5. If you have import the code . Be quiet sure to copy it to work space otherwise this error may occur.

Upvotes: 0

Michael Wang
Michael Wang

Reputation: 473

I fixed this issue by:

  1. Right click "google-play-services_lib" project, select "Properties".
  2. Click "Android" on left panel.
  3. Check a version of Android SDK on "Project Build Target", then select "OK" button.
  4. Rebuild google-play_services_lib project, now you have "google-play-services_lib.jar" in "bin" folder.
  5. Clean and rebuild your project.

Details: google-play-services_lib project's original build target is android-10. If you do not install this version of Android SDK in Eclipse, Eclipse just don't build it, leaving an empty bin folder. And our project reference to a .jar file in this bin folder, which results in the error message. So to fix this issue is just to check an appropriate build target for google-play-services_lib project.

Upvotes: 15

Jehong Ahn
Jehong Ahn

Reputation: 2406

I fonund my answer. I hope this helps someone.

  1. I've installed several versions of Android Build Tools. (17, 18, 18.1, 19). I read other questions and answers. Someone pointed Build Tools. So, I went to the SDK manager and I removed all Build Tools but not latest. (19)

  2. Clean google-play-servies. And re-build. Clean my project. And re-build.

  3. Voila~! Thanks all~! I'm very happy!!

Upvotes: 3

Kannan Arumugam
Kannan Arumugam

Reputation: 1121

My solution is,

  1. clean project google-play-services_lib firstly

  2. then clean my project which depends on play service library

Upvotes: 1

Zeba
Zeba

Reputation: 3041

I was facing the same issue and got it solved when I updated my eclipse Android SDK tools.
I was using version 22 and when I updated Android SDK tools to 22.0.1 the error vanished and I could build my project.
I hope this helps someone...

Upvotes: 0

yoah
yoah

Reputation: 7230

In Eclipse open Project -> Properties. Select Android on left. Check on the bottom that you have a reference to Google play services with a green checkmark. If not, click Add and add the google play services library

Upvotes: 8

Khalil Rumman
Khalil Rumman

Reputation: 557

I've tried everything but nothing works for me even Google sample projects, at last I've updated all the packages in sdk and eclipse ADT plugin to ADT 14, then it works fine :-)

Upvotes: 2

Wakawey
Wakawey

Reputation: 405

This answer worked for me https://stackoverflow.com/a/16398399/1874332

I met this issue as well.

My solution is,

clean project google-play-services_lib firstly then clean my project which depends on play service library

Upvotes: 18

Related Questions