don't android xml,Can't auto complete in XML files in Android St

可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):

问题:

Is there any way to auto complete in XML files in Android studio? Eg: When I start typing RelativeLayout, I want Android studio to recognize it and give me a bare-bones prototype that I can just fill in. Is there any way to enable this?

I checked other answers and my power save mode is off and I'm not using any external libraries.

回答1:

I finally notice it was only the current XML file I was working on which had the issue, and inside a relative layout that have been defined from the WYSWYG editor. Don't know why exactly, rewrite it and everything fine again.

回答2:

You can try File -> Invalidate Cache/Restart. That did it for me.

回答3:

If you cannot use autocomplete in any xml, the working solution is here.

However, if the problem is only with some xml files, you may have used custom views in them, where autocomplete will not work. The workaround is to temporarily change your custom view's name to its original android view and use autocomplete inside, and then revert the view to its custom name.

回答4:

You can check these from preferences.

Settings(Preferences in mac)->Editor->Code Completion

Please double check power safe mode too. it should be off

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值