如何为Android开发导入Google API

时间:2013-05-31 04:46:34

标签: android google-places-api

作为此问题的后续问题:Error - The import com.google can not be resolved,我想知道如何导入必要的Google API。

具体来说,我需要:

import com.google.android.gms.common.GooglePlayServicesUtil;

我已根据(The import com.google.android.gms cannot be resolved

的建议通过Android SDK管理器下载了Google Play

感谢您的帮助!

2 个答案:

答案 0 :(得分:2)

您可以在开发者网站上找到详细说明:

http://developer.android.com/google/play-services/setup.html

答案 1 :(得分:0)

您必须执行以下步骤

1.转到你的android sdk里面的android额外文件夹。

2.然后转到google文件夹,然后你会找到google play services文件夹。

3.在Google Play服务中,您会找到libproject文件夹。您必须将其作为工作区中的库项目导入。

4.在您的应用程序中将此库项目添加为库。

注意 - 如果您在google play services文件夹中找不到libproject文件夹,请在您的sdk中更新您的Google Play服务。