无法解析导入com.google.android.gms.ads

时间:2014-08-18 23:42:50

标签: android eclipse google-play-services

当我想在Eclipse中导入google-play-service时出错。 我在Eclipse中导入了google-play-service-project-lib 我已经阅读了所有可能的Q& A但没有任何工作。 我手动添加了Library和JAR 然后我试图清理我的项目...

Screenshot

有没有人可以解决这个问题?

enter image description here

2 个答案:

答案 0 :(得分:4)

你可以用这种方式。首先是使用google-play-services库的密切项目。只要将鼠标悬停在无法解析的com.google.android.gms导航栏上,请在弹出菜单底部选择“Fix project setup”选项,如下所示。然后它会提示导入google-play-services库。

enter image description here

答案 1 :(得分:1)

首先,尝试下载最新版本的Google Play服务,然后:

  • 删除现有库以手动重新添加
  • 转到您的java构建路径
  • 在项目标签下添加您的库,然后
  • 在订单&导出选项卡勾选您的库,
  • 应用设置。

毕竟,只需清理项目和库,就可以了。

顺便说一下,您还可以查看this question.