在Android Studio 2.2.3中更改外部注释文件夹

时间:2017-01-07 21:20:01

标签: android-studio

我在Android工作室中设置了一次外部注释文件夹。现在,我想按照https://www.jetbrains.com/help/idea/2016.3/using-external-annotations.html#d2150916e113指南更改文件夹位置。但是,没有“路径”选项卡......

有谁知道怎么做?任何配置文件......无论如何!

enter image description here

3 个答案:

答案 0 :(得分:2)

参考这个,https://blog.jetbrains.com/idea/2008/02/external-annotations/我也遇到了这个问题,即本页提到的模块设置的Annotations区域中没有Paths选项卡。

但是,您可以编辑模块文件夹中的.iml或项目文件夹中的.iml,具体取决于您是否只为特定模块或整个项目创建外部存储注释。

annotation-paths标记是您需要编辑的标记。     
<annotation-paths> <root url="file://$MODULE_DIR$" /> </annotation-paths>

答案 1 :(得分:1)

我遇到了同样的问题,而另一个答案对我没有帮助 - 我无法在<annotation-paths>文件中的任何位置找到.iml但无法找到设置gui的一部分来改变它。

我注意到Android Studio会要求我为来自不同库的注释创建一个新的目录树。所以在狩猎之后,我发现在<project>/.idea/libraries/<libname>.xml中有<ANNOTATIONS>个标签可以更改。

对于大多数图书馆来说,这是有效的,但是我找不到Android SDK中实际课程的任何文件或<ANNOTATIONS>

答案 2 :(得分:1)

Android Studio将其全局保存,如果您想要更改或删除它,请关闭Android Studio并按照以下步骤操作:

您可以在

中搜索annotationsPath
  

C:\ Users \ USER ACCOUNT NAME \ .AndroidStudio3.0 \ config \ options \ jdk.table.xml

如果使用其他Android Studio版本,请查找类似的文件夹。

jdk.table.xml文件中,查找它:

    <annotationsPath>
      <root type="composite">
        <root type="simple" url="jar://$APPLICATION_HOME_DIR$/plugins/android/lib/androidAnnotations.jar!/" />
        <root type="simple" url="file://..." />
      </root>
    </annotationsPath>

然后更改url="file://...,或删除<root type="simple" url="file://..." />行,Android Studio会在下次需要时再次询问。