简体   繁体   English

Android Studio无法从外部库自动完成XML中的值

[英]Android Studio not auto-completing values in XML from external libraries

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. 我正在使用Android Studio,但遇到一个问题,它将自动完成xml布局文件中的内容,例如在同一项目中定义的调光,颜色和可绘制文件,但是如果这些资源来自导入的库,它不会自动完成。

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... 奇怪的是,如果我在* .java文件中,它将识别导入的库中的值并自动完成它们的工作……

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? 我应该在build.gradle文件中添加一些内容以使它们识别这些值吗? Any advice or assistance would be greatly appreciated. 任何建议或协助将不胜感激。

Thanks. 谢谢。

如果您升级到AndroidSudio 0.5.1,则开发人员环境会正确映射到所有资源值以自动完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM