简体   繁体   English

导入google-play-service:资源“ / HomeActivity”已存在

[英]import google-play-service: Resource '/HomeActivity' already exists

Ok... this is my problem. 好吧...这是我的问题。 When I try to import google-play-service, Eclipse show me this error: 当我尝试导入google-play-service时,Eclipse向我显示此错误:

Resource '/HomeActivity' already exists. 资源“ / HomeActivity”已存在。

Reason: 原因:

Resource '/HomeActivity' already exists. 资源“ / HomeActivity”已存在。

Then, all the projects that are imported, have red globes with X (some error). 然后,所有导入的项目都有带有X的红色地球仪(有些错误)。 And the library is not usefull. 而且该库没有用。

can someone help me? 有人能帮我吗?

Package_A= "Is Library" is checked. Package_A =“正在存储库”已检查。

Package_B= "Is Library" is checked. Package_B =“正在存储库”已检查。 References Package_A. 参考Package_A。

Package_C= "Is Library" is checked. Package_C =“正在存储库”已检查。 References Package_B. 参考Package_B。

Package_D= "Is Library" is NOT checked. Package_D =“不是库”未选中。 References Package_C. 参考Package_C。

If you have HomeActivity inside both Package_B and Package_C = ERROR 如果Package_B和Package_C都包含HomeActivity =错误

If the way you reference the package is not what I described above= ERROR 如果您引用软件包的方式不是我上面描述的=错误

This error is caused because Eclipse tries to import samples of Google Play Services that have the same Activities/Project names. 造成此错误的原因是,Eclipse尝试导入具有相同“活动/项目”名称的Google Play服务示例。

To avoid these errors, just import the google-play-services_lib instead of the google_play_services folder. 为避免这些错误,只需导入google-play-services_lib而不是google_play_services文件夹。

Example: adt-bundle-linux-x86_64-20131030/sdk/extras/google/google_play_services/libproject/google-play-services_lib 示例:adt-bundle-linux-x86_64-20131030 / sdk / extras / google / google_play_services / libproject / google-play-services_lib

The reason why this is happening is because HomeActivity is present both in your project as well as in Google Play library. 发生这种情况的原因是,您的项目以及Google Play库中都存在HomeActivity。 Rename your HomeActivity to another name which is not the in play library project 将您的HomeActivity重命名为不在游戏库项目中的其他名称

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

相关问题 导入google-play-service依赖红叉 - import google-play-service dependency red cross 导入google-play-service库,出现“找不到要导入的项目” - Importing google-play-service library, appear “No projects are found to import” 将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? 将Google Play服务源添加到我的Android应用程序中 - Adding google-play-service source to my android application Google Play需要4132500-导入了任何google-play-service库版本 - Google play requires 4132500 - with any google-play-service library version imported 导入此参考android旁边显示红色X的google-play-service库 - Importing google-play-service library showing a red X next to this reference android 无法引用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服务资源 - Google play service resource not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM