[英]Add local javadoc to local aar in Android-Studio
Is there a way to attach javadocs, provided in a jar, to a aar library? 有没有办法将jar中提供的javadoc附加到aar库? There is no source code available and both files exist locally (not in a repository).
没有可用的源代码,并且这两个文件都存在于本地(不在存储库中)。
The aar is added through: 通过以下方式添加aar:
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile(name:'library', ext:'aar')
}
And works fine (besides the inability to add docs). 并且工作正常(除了无法添加文档)。
What I tried (and did not work): 我尝试了什么(并没有奏效):
Environment: 环境:
Android-Studio 0.8.2 Android-Studio 0.8.2
gradle plugin 0.12 gradle插件0.12
It might not be possible ATM (see this bug: https://code.google.com/p/android/issues/detail?id=73087 ) but any workaround would be appreciated. 它可能不可能是ATM(请参阅此错误: https : //code.google.com/p/android/issues/detail?id = 73087 ),但任何解决方法都将不胜感激。
It is possible now to attach locale javadocs to an aar in Android-Studio, there are still problems though. 现在可以将locale javadocs附加到Android-Studio中的aar,但仍然存在问题。
This works with Android-Studio 1.3.2 and Android-Gradle-Plugin 1.3 and Gradle 2.5. 这适用于Android-Studio 1.3.2和Android-Gradle-Plugin 1.3和Gradle 2.5。
In the Project view -> select "Project" viewing style -> Expand "External Libraries" and right click on the desired library -> select "Library Properties..." 在项目视图中 - >选择“项目”查看样式 - >展开“外部库”并右键单击所需的库 - >选择“库属性...”
(The image just shows where to find the "Library Properties", i know that this is not necessary for appcompat) (图像只显示在哪里可以找到“库属性”,我知道这对appcompat来说不是必需的)
In the upcoming dialog click the + Symbol and point to the location where the unpacked javadocs are stored. 在即将出现的对话框中,单击+符号并指向存储解压缩的javadoc的位置。
Caveat: 警告:
The settings does currently not survive a gradle project sync. 这些设置目前无法在gradle项目同步中继续存在。
Reference: 参考:
https://code.google.com/p/android/issues/detail?id=73087 https://code.google.com/p/android/issues/detail?id=73087
有一个解决方法,您可以将您的aar和源代码安装到本地maven仓库并从那里导入它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.