如何将 Google API 库手动添加到 Eclipse 中的项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7507513/
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 17:01:37  来源:igfitidea点击:

How to add manually Google API library to a project in Eclipse?

androideclipseapigoogle-maps

提问by Krzysztof Dworucha

I'm doing small GPS project. Before I work on 32-bit laptop and I had option Target device: 2 x per every API. one was from Google and second from device. my laptop went down. I've bought new one 64-bit. I've installed every thing from beginning and now I don't have Google API option when I'm beginning new project. And when I try to add any libraries to an existing project I have also not even a single one to pick. I've had reinstall everything 3 times and nothing, so now I have only one option - add it manually to my project.

我正在做小型 GPS 项目。在我使用 32 位笔记本电脑之前,我有选项 Target device: 2 x per each API。一个来自谷歌,第二个来自设备。我的笔记本电脑坏了。我买了一个新的64位。我从一开始就安装了所有东西,现在当我开始新项目时没有 Google API 选项。当我尝试将任何库添加到现有项目时,我什至没有一个可供选择。我已经重新安装了所有东西 3 次,什么都没有,所以现在我只有一个选择 - 将它手动添加到我的项目中。

Where I can download Google Maps API for Android, and how to add them to my existing project manually

在哪里可以下载适用于 Android 的 Google Maps API,以及如何手动将它们添加到我现有的项目中

回答by

You can install the Google API targets by opening the SDK and AVD manager. Either go to Window -> SDK and AVD Managerinside eclipse or start the androidapplication from the ANDROID_SDK\toolsfolder.

您可以通过打开 SDK 和 AVD 管理器来安装 Google API 目标。转到Window -> SDK and AVD Managereclipse 内部或androidANDROID_SDK\tools文件夹启动应用程序。

When open, select Available packageson the left, then open the Android Repositorytree. There should be various google APIs listed. Check the ones with the API levels you need and click Install selected. After everything went through, you can start a new project with the desired google APIs.

打开后,选择Available packages左侧,然后打开Android Repository树。应该列出各种谷歌 API。检查具有您需要的 API 级别的那些,然后单击Install selected。一切都完成后,您可以使用所需的 google API 开始一个新项目。