eclipse 无法将 Google Play 服务库导入项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17793112/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 20:56:02  来源:igfitidea点击:

Can't import Google Play Services library to project

androideclipsegoogle-play-services

提问by buczek

I am trying to import google play services into my project.

我正在尝试将 google play 服务导入到我的项目中。

I am using Eclipse and went to File->Import->Existing Android Code Into Workspace->Next->BrowseBrowsed to:

我正在使用 Eclipse 并转到File->Import->Existing Android Code Into Workspace->Next->Browse浏览到:

C:\Users\Ami\android-sdks\extras\google\google_play_services

Here I saw samples/map, samples/panorama, and samples/plus. If I browse even deeper to:

在这里,我看到了samples/mapsamples/panoramasamples/plus。如果我更深入地浏览:

C:\Users\Ami\android-sdks\extras\google\google_play_services\libproject\google-play-services_lib

I get the error or Select a directory to search for existing Android projects, but there are no projects to select from the directory. I tried pressing the refresh button and nothing updated.

我收到错误 或Select a directory to search for existing Android projects,但没有可以从目录中选择的项目。我尝试按下刷新按钮,但没有任何更新。

enter image description here

在此处输入图片说明

I have Google Play Services installed in the SDK manager

我在 SDK 管理器中安装了 Google Play 服务

enter image description here

在此处输入图片说明

I have tried:cleaning and building my workspace. Closing and restarting Eclipse. Restarting my computer. Uninstalling Google Play Services and reinstalling it. Deleting the files from Windows Explorer and reinstalling them with Android SDK Manager. I would greatly appreciate any help.

我尝试过:清理和构建我的工作区。关闭并重新启动 Eclipse。重新启动我的电脑。卸载 Google Play 服务并重新安装。从 Windows 资源管理器中删除文件并使用 Android SDK 管理器重新安装它们。我将不胜感激任何帮助。

回答by user3051833

  1. Copy your Google play services from sdk->extras->google->googlePlayservices to a different location (i.e. Desktop)
  2. Import it into Eclipse from there
  1. 将您的 Google Play 服务从sdk->extras->google->googlePlay服务复制到不同的位置(即桌面)
  2. 从那里将其导入 Eclipse

回答by buczek

I found that the Android SDK Manager was saving to a different location than where I was looking. I had two Google Play Services in different files and under android-sdks was not the correct location. It was instead in my workspace under a file called: adt-bundle-windows. I think the file location changed due to installing a different version of Eclipse.

我发现 Android SDK 管理器保存到的位置与我查找的位置不同。我在不同的文件中有两个 Google Play 服务,并且在 android-sdks 下的位置不正确。它在我的工作区中名为:adt-bundle-windows 的文件下。我认为由于安装了不同版本的 Eclipse,文件位置发生了变化。

回答by khanna..abhishek

If some one still not able to find the google play serice project..... go to your sdk manager and download Google play API from Extra tags...Hope it help.... as i have the same issue

如果有人仍然无法找到 google play 服务项目..... 转到您的 sdk 管理器并从额外标签下载 Google play API...希望它有所帮助...因为我有同样的问题