在eclipse中调试别人的android源代码时遇到常规问题——ADT插件可能无法正常运行

发布于 2024-09-08 09:13:15 字数 887 浏览 0 评论 0原文

这可能是一个非常基本的问题,或者是我的设置所特有的(希望不是太奇特),

我是 Android 开发新手,并且一直在研究developer.android.com 上提供的教程。

我从头开始创建的项目没有问题,但是当我从 android.com 或任何其他 android 项目提供的 android 示例代码启动项目时,我似乎永远无法消除错误,甚至无法运行事物。

例如,当加载 android-7 示例包中的 NotePad 示例时 -

从错误日志中我看到:

无法加载属性文件com.android.ide.eclipse.adt 从插件调用代码时出现问题:“org.eclipse.jface”。

从问题日志中我得到:

error_message 无法解析或不是字段 menu_delete 无法解析或不是字段
menu_discard 无法解析或不是字段 text_edit 无法解析或不是字段

等,不想列出所有内容

似乎它与 res/values 中的 strings.xml 文件配合得不好

尝试过: 1. 使用 cmd,shft,O 导入缺少的任何内容 2. 通过 Android Tools 修复属性 3. 项目>>清洁... 4. 确保 SDK 版本全部匹配 5.重启又重启

什么也没有,仍然出现错误。

有人知道我做错了什么吗?

想要一个通用的解决方案,一些更全局的解决方案,因为每当我从外部提取任何人的源代码时就会发生这种情况。

有点沮丧,因为我觉得我花了太多时间解决这些问题,而无法根据其他人的代码在模拟器中的执行情况来研究它。

This might be a pretty basic question, or peculiar to my set up (hopefully not too peculiar)

I am new to android development and have been playing around with the tutorials offered at developer.android.com.

I don't have a problem with projects I create from scratch, but when I start a project from the android sample code provided at android.com or from any other android project, I can never seem to get the bugs out to even run the thing.

For example, when loading up the NotePad sample in the android-7 package of samples -

from the error log I see:

Failed to load properties file com.android.ide.eclipse.adt
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

from the problems log I get:

error_message cannot be resolved or is not a field
menu_delete cannot be resolved or is not a field
menu_discard cannot be resolved or is not a field
text_edit cannot be resolved or is not a field

etc., didn't want to list them all

It seems that it is not playing well with the strings.xml file in res/values

Have tried:
1. Importing anything missing w/ cmd,shft,O
2. Fixing properties from Android Tools
3. Project>>Clean...
4. Making sure that the SDK Versions all match up
5. Restarting and restarting

Nothing, still getting the error.

Anyone have any ideas what I am doing wrong?

would like a general solution, something more global bc this is occurring whenever I pull in anyone's source code from outside.

kind of frustrated because I feel that I am spending too much time working out these kinks and not being able to study other people's code against how it performs in the emulator.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

路弥 2024-09-15 09:13:15

我遇到了类似的问题,并且与我在导入示例时选择的 SDK 版本有关。您必须选择用于创建项目的相同版本。我相信是1.5

I had similar issues and were related to the SDK version I was choosing when importing the samples. You have to pick the same version used to create the project. I believe it's 1.5

涫野音 2024-09-15 09:13:15

新手错误 - 查看错误的数字来确定将哪个版本附加到导入的项目。

Rookie mistakes - was looking at the wrong numbers to determine what version to attach to an imported project.

_失温 2024-09-15 09:13:15

有时,您也可以尝试右键单击您的项目,然后右键单击 Android,然后“修复项目属性”。

希望我有所帮助。

Sometimes, you can also try a right-click on your project, then Android, then "fix project properties".

Hope I have helped.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文