【问题标题】:google play services lib... cannot import com.google.android.gms.map (using eclipse)google play services lib...无法导入com.google.android.gms.map(使用eclipse)
【发布时间】:2013-09-16 07:37:32
【问题描述】:

我在使用 google play 服务库时遇到了一些问题(使用 eclipse)。因此,我尝试执行以下示例https://developers.google.com/maps/documentation/android/intro

但是对于 com.google.android.gms.maps 下面的所有导入,我仍然有多个错误。

  • 我在我的 Eclipse 工作区中导入了 google-play-services_lib
  • 在我的项目>properties>android>库中实际上引用了 google-play-services_lib
  • 它也在 java 构建路径 > 库中被引用

【问题讨论】:

  • 别这样,直接导入库有问题。先把库复制到工作区,再从工作区导入,就可以了。
  • 谢谢,这次我确实将复制文件导入到工作区,但它没有解决我的问题:/

标签: android eclipse google-play-services


【解决方案1】:

尝试在 Eclipse 中将 yourAdtBundlePath/sdk/extras/google/google_play_services/libproject/google-play-services_lib 作为项目导入(我假设您使用 Eclipse),然后将其作为库添加到 Properties for YourProject/Android/Library/Add...

【讨论】:

  • 感谢您的反馈,实际上我可能不够精确。 google-play-services_lib 已经是一个项目,我在我的示例项目 project>android>library 以及 java build path>libraries 中引用了它
  • 它终于起作用了,但我不太明白。我删除了所有内容,然后通过将文件复制到 eclipse 中重新导入,确保没有在 java 构建路径中进行任何引用,但仅在 android>库中进行了引用
猜你喜欢
  • 2019-09-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-31
  • 1970-01-01
  • 2014-12-04
  • 1970-01-01
相关资源
最近更新 更多