Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change external annotations folder in Android Studio 2.2.3

I set the folder for external annotation once in my Android studio. Now, I wanted to change the folder location, following https://www.jetbrains.com/help/idea/2016.3/using-external-annotations.html#d2150916e113 guideline. However, there is no Paths tab...

Does anyone know how to do it? Any config file... whatever!

enter image description here

like image 453
user2878850 Avatar asked Nov 29 '25 20:11

user2878850


2 Answers

With reference to this, https://blog.jetbrains.com/idea/2008/02/external-annotations/ I also faced this problem that there is no Paths tab in the Annotations area in the module settings as mentioned in this page.

However, you can edit the .iml in your module folder or .iml in your project folder, depending on whether you want to have externally stored annotations for only a specific module or entire project.

The annotation-paths tag is the one you need to edit.
<annotation-paths> <root url="file://$MODULE_DIR$" /> </annotation-paths>

like image 160
Rajan Prasad Avatar answered Dec 01 '25 11:12

Rajan Prasad


I had this same problem, and the other answer didn't help me -- I couldn't find <annotation-paths> anywhere in an .iml file and couldn't find a part of the settings gui to change this.

I noticed that Android Studio would ask me to create a new directory tree for annotations from different libraries. So after hunting around, I found that in <project>/.idea/libraries/<libname>.xml there are <ANNOTATIONS> tags that can be changed.

For most libraries this worked, however I couldn't find any file or <ANNOTATIONS> for the actual classes in the Android SDK.

like image 28
Pod Avatar answered Dec 01 '25 10:12

Pod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!