简体   繁体   English

将Google Play服务源添加到我的Android应用程序中

[英]Adding google-play-service source to my android application

I want to add Google-map to my android application and I followed this tutorial: https://developers.google.com/maps/documentation/android/start#overview but it shows me an error. 我想将Google-map添加到我的android应用程序中,并按照以下教程进行操作: https : //developers.google.com/maps/documentation/android/start#overview但它显示了一个错误。 which is: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version'). 这是:错误:错误:找不到与给定名称匹配的资源(在“值”处与值“ @ integer / google_play_services_version”)。 when I searched in Google trying to solve the problem, I found that I have to do these steps: 当我在Google中搜索以解决问题时,我发现必须执行以下步骤:

  1. In the Package Explorer, right-click the dependent project and select Properties. 在程序包资源管理器中,右键单击相关项目,然后选择“属性”。
  2. In the Properties window, select the "Android" properties group at left and locate the Library properties at right. 在“属性”窗口中,选择左侧的“ Android”属性组,然后在右侧找到“库”属性。
  3. Click Add to open the Project Selection dialog. 单击添加以打开“项目选择”对话框。
  4. From the list of available library projects, select a project and click OK. 从可用库项目列表中,选择一个项目,然后单击“确定”。
  5. When the dialog closes, click Apply in the Properties window. 对话框关闭时,在“属性”窗口中单击“应用”。
  6. Click OK to close the Properties window. 单击“确定”关闭“属性”窗口。

But when I Click Add to open the Project Selection dialog which is step number 3, I could not choose any library project. 但是,当我单击添加以打开步骤3的“项目选择”对话框时,我无法选择任何库项目。 ie the list is empty. 即列表为空。

I don't know if I should add @integer.xml file? 我不知道是否应该添加@ integer.xml文件? If so, how to do that? 如果是这样,该怎么做? I am sorry but I am really new to eclipse. 抱歉,我真的是新来的。 So, could anyone help me please:( 所以,有人可以帮我吗:(

Thanks.. 谢谢..

First, make sure you have the Play Services project in your workspace, as explained here: http://developer.android.com/google/play-services/setup.html 首先,请确保您的工作区中有Play Services项目,如下所述: http : //developer.android.com/google/play-services/setup.html

Now make sure that it is a Library Project. 现在确保它是一个图书馆项目。 Right-click the play-services project -> Properties -> Android and make sure you check Is Library after the list of build targets. 右键单击play-services项目-> Properties-> Android,并确保在构建目标列表之后选中Is Is Library

After that, redo the steps you listed. 之后,重做您列出的步骤。 In Step 4 Play Services will be in the list. 在步骤4中,播放服务将在列表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Google Play服务导入Ecplise时出错 - Error in importing Google-play-service into Ecplise 为什么在我的 phonegap 应用程序中找不到 google-play-service,因为我已经添加了最新的 jar? - Why google-play-service is not found in my phonegap app as I already add the latest jar? 导入此参考android旁边显示红色X的google-play-service库 - Importing google-play-service library showing a red X next to this reference android 导入google-play-service依赖红叉 - import google-play-service dependency red cross 导入google-play-service:资源“ / HomeActivity”已存在 - import google-play-service: Resource '/HomeActivity' already exists 导入google-play-service库,出现“找不到要导入的项目” - Importing google-play-service library, appear “No projects are found to import” Google Play需要4132500-导入了任何google-play-service库版本 - Google play requires 4132500 - with any google-play-service library version imported 无法引用google-play-service lib。 我该如何解决? - Can't make a reference to google-play-service lib. How can i fix it? 由于google-play-service,无法在单个dex文件中使用所请求的类 - Cannot fit requested classes in a single dex file due to google-play-service Google Play商店中基于服务的Android应用程序 - Service based Android application on Google Play Store
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM