Java 源未找到Android?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2071614/
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
Source not found Android?
提问by UMAR
am facing a problem in Eclipse android development tool
我在 Eclipse android 开发工具中面临一个问题
Source not found
EDIT SOURCE LOOKUP PATH
while i debug code in class Instrumentation.class at line @param info ActivityInfo from the manifest
当我在清单中的 @param info ActivityInfo 行调试类 Instrumentation.class 中的代码时
above error is raised.
出现上述错误。
can any one guide me how to resolve this issue?? i am new to android development..
任何人都可以指导我如何解决这个问题?我是安卓开发的新手..
采纳答案by Dave Webb
The sources of the Android API are not included in the SDK download. So when the debugging goes to an Android class Eclipse will raise an error.
SDK 下载中不包含 Android API 的源代码。因此,当调试转到 Android 类时,Eclipse 将引发错误。
Have a look at this questions for instructions on how to add the source to Eclipse.
回答by Andreas Dolk
Check your eclipse build path if the folder, that contains you source code is really on the defined build path.
如果包含源代码的文件夹确实在定义的构建路径上,请检查您的 eclipse 构建路径。
回答by Dinesh
I came across the same error. It was due to variable used to change the app background color. I had created a varibale in string.xml as mycolor = "#FF3344" and had added it as background of Linerar Layout. It seems more of coding error.
我遇到了同样的错误。这是由于用于更改应用程序背景颜色的变量。我在 string.xml 中创建了一个变量 mycolor = "#FF3344" 并将其添加为线性布局的背景。似乎更多的编码错误。
回答by Deva
If an activity want any special feature, then it should be registered on the manifestfile
for permission to handle that feature. If you are not registering it in manifestfile, then the
如果活动需要任何特殊功能,则应在 上注册manifestfile
以获得处理该功能的权限。如果您没有在清单文件中注册它,那么
source not found
EDIT SOURCE LOOKUP PATH
未找到来源
编辑源查找路径
would occur when you are on debugging mode.
当您处于调试模式时会发生。
I would recommend especially for focus on "uses-permission" tag in manifestfile
我特别推荐关注 manifestfile 中的“uses-permission”标签
回答by Bahaa Hany
Probably the problem is in wrong coding. Check the AndroidManifest.xml file.
问题可能出在错误的编码上。检查 AndroidManifest.xml 文件。