Intellij IDEA CE 12 Android XML Code Completion not working

匆匆过客 提交于 2019-12-06 00:13:52

问题


I just started to learning IntelliJ IDEA CE 12 for Android development, as an alternate to Eclipse.

IDEA is very quick and I'm beginning to like it.
However, when I try to edit Android XML file, the code completion never appears. In my office, I'm using MacBook Air (64bit), and when I tried Mac version, it worked beautifully.
In my home, I'm using Vista (32bit ver) and my laptop specs are not so good. (that's why I choose to change to IDEA from Eclipse...)

I have not changed any Settings after the installation. Is there any option(s) to enable code completion for Android XML editor? Or it is just the matter of machine's performance?

I know it's a rubbish question, but I really need help here.
Thank you in advance.


回答1:


Please check that project is configured properly and your module has Android facet and Android SDK Platform in the dependencies.

IntelliJ IDEA performs indexing of the JSDK, Android Platform and your project when you open it for the first time. You need to wait for the indexing process to complete (progress is displayed in the status bar at the bottom).

Once indexing is complete, you should get all the code completion options available. If for some reason it still doesn't work, try File | Invalidate Caches and restart IDEA.




回答2:


Faust,

I was having the same problem and here are the solutions I found:

  1. Go to File->Power Save Mode and disable it.
  2. Go to Preferences->Editor->Code Completion and check Autopopup code completion
  3. Go to File->Invalidate Caches and restart.

Disabling Power Save Mode is what fixed it for me!



来源:https://stackoverflow.com/questions/14450209/intellij-idea-ce-12-android-xml-code-completion-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!