eclipse 调试Android应用程序时无源附件错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6228925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:23:33  来源:igfitidea点击:

No source attachment error when debugging Android applications

androideclipse

提问by martijn_himself

I have just started doing Android development on Mac OS X in Eclipse. When debugging an Activity, I keep getting the following errors:

我刚刚开始在 Eclipse 中在 Mac OS X 上进行 Android 开发。调试活动时,我不断收到以下错误:

The JAR file /platforms/android-10/android.jar has no source attachment.

JAR 文件 /platforms/android-10/android.jar 没有源附件。

This is starting to get very annoying, does it mean something is throwing an exception somewhere? (the message itself does not give any meaningful information as to why this is happening) I do not want to step into the source; does Eclipse do this by default? How do I disable it?

这开始变得非常烦人,这是否意味着某些东西在某处抛出异常?(消息本身并没有提供任何有意义的信息来说明为什么会发生这种情况)我不想进入源头;Eclipse 是否默认执行此操作?如何禁用它?

采纳答案by inazaruk

It looks like you have some error in your application. And Android subsystem throws exception. Normally, if such exception originates from android, you'll see this behavior.

您的应用程序中似乎存在一些错误。并且 Android 子系统抛出异常。通常,如果此类异常源自 android,您将看到此行为。

What you should do:

你应该做什么:

  1. Turn on LogCatview to see logs.
  2. Launch your app without debugger (Ctrl+F11 on ubuntu/windows)
  3. Inspect those logs in LogCatvery carefully. They will contain the place where exception happened (originating from your code). You will then easily be able to fix the issue yourself (or ask for more assistance if needed).
  1. 打开LogCat视图以查看日志。
  2. 在没有调试器的情况下启动您的应用程序(在 ubuntu/windows 上为 Ctrl+F11)
  3. LogCat非常仔细地检查这些日志。它们将包含发生异常的地方(源自您的代码)。然后,您可以轻松地自己解决问题(或在需要时寻求更多帮助)。

In a normal development workflow you shouldn't hit cases like yours too often. Its just the learning curve :) So stay calm and keep learning.

在正常的开发工作流程中,您不应该经常遇到像您这样的案例。它只是学习曲线 :) 所以保持冷静并继续学习。