android - 此类文件的 Jar 属于容器 'Android Dependencies',该容器不允许修改其条目上的源附件

标签 android dependencies jakarta-mail

我正在制作一个电子邮件应用程序,该应用程序在此问题的标题中给出了错误。我该如何解决这个问题?如果有助于找到解决方案,我将提供我的代码截图。

enter image description here

最佳答案

对此有官方解决方案:

Allow src/doc attachement for 3rd party jars in libs/

Since those jars are added dynamically through a classpath container, the devs cannot set the source path and the javadoc through Eclipse UI (container don't allow editing those). To fix this, and to make sure that both paths are picked up not only by the current project, but also by other projects (if the current project is a library project), the value is set by a file sitting next to the jar file. The file is name after the jar file, adding .properties at the end. For instance foo.jar -> foo.jar.properties It can currently contain 2 properties: src: relative or absolute path to the source folder (or archive). doc: relative or absolute path to the javadoc.

https://android-review.googlesource.com/#/c/35702/

编辑:Explanation in Google I/O 2012 video

例如,对于 Joda-Time 2.1:

cd $PROJECT/libs
touch joda-time-2.1.jar.properties

并插入以下内容,确保路径正确:

src=/Users/josh.oneal/SDKs/joda-time-2.1/joda-time-2.1-sources.jar
doc=/Users/josh.oneal/SDKs/joda-time-2.1/joda-time-2.1-javadoc.jar

您现在可以在 Eclipse 中右键单击您的项目并刷新,然后 Command/Ctrl + 单击一个类,例如 DateTime 以查看其源代码。

关于android - 此类文件的 Jar 属于容器 'Android Dependencies',该容器不允许修改其条目上的源附件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10075453/

相关文章:

java - 将范围更改为运行时后依赖性消失

java - 如何确定一组 springframework 依赖项的 <parent> 依赖项

grails - 如何排除 grails 全局依赖

JavaMail - 发件人地址被拒绝 : Access Denied

android - 无法捕获 HTTPS 请求 - 移动性能测试

java - 将多个图像或文件上传到 firebase 中的存储并获取其 uri 并将 uri 放入数据库中

java - 带 [20th] 后缀的日期格式

android - OpenGL 渲染器 : Bitmap too large to be uploaded into a texture in android titanium

java - 无法在 linux 中使用 javamail api 发送电子邮件

android - 无法从我的主机发送邮件