eclipse 找不到导入
我正在尝试按照以下站点的说明安装 picasa Web Android 客户端应用程序:
我不知道为什么这个项目需要 Mercurial (来源控制工具) 和 maven (构建工具),当我使用过的其他项目都不需要时 要么,但尽管如此,我已经遵循了所有步骤,并且几乎已经得到了代码 运行但是,我偶然发现了以下问题:
第一组导入(例如)
import com.google.api.client.extensions.android2.AndroidHttp;
工作正常,而第二组(例如
import android.accounts.Account;
标志)作为错误(导入无法解析)。
我在开发人员控制台中收到以下错误消息:
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
在 eclipse 导航器中,我有一个名为 src/main/java 的类似文件夹的小部件,它看起来很奇怪(不知道为什么它不是三个文件夹)。
但我主要也是最重要的问题是,为什么找不到进口?
I am trying to follow the instructions at the following site to install a
picasa web android client application:
I don't have a clue why this project needs mercurial (a source control tool)
and maven (a build tool) when none of the other projects I've worked with needed
either, but nevertheless I've followed all the steps and I've almost got the code
running but, I've stumbled upon the following problem:
the first set of imports such as
import com.google.api.client.extensions.android2.AndroidHttp;
works fine whereas the second set such as
import android.accounts.Account;
flags as an error (the import cannot be resolved).
and I get the following error message in the developer console:
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
[2012-01-19 00:10:06 - picasa-android-sample] Unable to resolve target 'Google Inc.:Google APIs:7'
In eclipse navigator I have a folder-like widget called src/main/java which looks odd (not sure why it is not three folders).
But my main and most important question is, why are the imports not being found?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 eclispse 中右键单击您的项目并打开属性。选择 android 并查看您的目标 Android 版本。您可能需要选择包含 Google API 的一个。它们与操作系统的核心分离,并提供对某些谷歌服务的访问。
您可以在此处找到有关 Google API sdk 插件<的详细信息/a> 如果你还没有安装它并被你的 eclipse 识别。
In eclispse right click your project and open properties. Chose android and see what version of Android you are targeting. You might need to select one that that includes Google API's. Those are separated out from the core of the OS and offer access to some of the google services.
Here is where you can find more info about the Google APIs sdk addon if you don't already have it installed and being recognized by your eclipse.