2

I'm using Android Studio, and I'm encountering an issue where it will auto-complete things in xml layout files such as dimens, colors, and drawable files that are defined in the same project, but if these resources are from imported libraries, it will not auto-complete.

If I type the value in manually, it will recognize it as a correct, existing value, and the project will compile and run correctly. So, I'm assuming this is just an issue with the development environment not being able to find it to populate the list for autocomplete.

The strange thing about this, is that if I'm in a *.java file, it will recognize values from the imported library and autocomplete them just fine...

Has anyone else encountered this issue? Is there something I should be including in the build.gradle file which would make it recognize these values? Any advice or assistance would be greatly appreciated.

Thanks.

Marcubus
  • 113
  • 1
  • 10
  • which version of studio are you using ? Please show your code and explain what exactly are you trying to do. – Piyush Agarwal Mar 07 '14 at 21:21
  • This is working correctly for me in 0.5.0 autocompleting things in appcompat-v7. – Scott Barta Mar 07 '14 at 22:26
  • This is no related to any Android code. It's my own custom library. Image a library where the entire library is me defining one color value as marcubus_blue=#0000FF. Then in my XML I make a LinearLayout and I want to set the background color to marcubus_blue. I start typing mar then I hit ctrl+space to auto complete, and marcubus blue is not in the list of values to autocomplete. If I type in marcubus_blue manually it works and compiles properly. It just doesn't show up in my list of autocomplete options. I'm using v0.4.6, I'll try updating to 0.5.0 and let you know if that helps. – Marcubus Mar 10 '14 at 13:10
  • Hey, I just upgraded, and this was fixed in v0.5.1 – Marcubus Mar 10 '14 at 14:09
  • Thanks everyone who offered help or read the question. – Marcubus Mar 10 '14 at 14:10

1 Answers1

1

If you upgrade to AndroidSudio 0.5.1, the developer environment maps to all resource values correctly for auto-complete.

Marcubus
  • 113
  • 1
  • 10