Where is Android Studio layout preview?

2019-01-02 17:41发布

I installed Android Studio, but when I edit my layout files, I can't find live preview! I just see an XML file. How can I see my layout in graphical view?

Update: This is how it looks like in my case:

enter image description here

17条回答
牵手、夕阳
2楼-- · 2019-01-02 18:13

In case you want docked mode, (it still visible while editing the xml file), and you, by mistake, clicked and unmarked docked mode. In order to get it back you have focus on preview and click Window > Active Tool Window > Docked Mode.

查看更多
明月照影归
3楼-- · 2019-01-02 18:14

Go to File->Invalidate Caches / Restart.

This will solve the issue.

查看更多
不再属于我。
4楼-- · 2019-01-02 18:17

I had the same issue and resolved by editing the t file in src>main>res>layout. You can choose between Test and Design mode at the bottom of editor.

Quite simple if we know where to look for !!! spend few hours figuring it out!!!

查看更多
还给你的自由
5楼-- · 2019-01-02 18:17

If you see a message at the bottom saying something like, "Android Framework detected. Click to configure", DO IT.

After doing this, my Text and Design bottom-tabs appeared.

查看更多
看风景的人
6楼-- · 2019-01-02 18:18

The following worked for me:

-> file

-> settings

-> plugins

-> disable the android support plugin

-> you will be prompted to restart

-> once restarted re-enable the plugin and other dependency plugins that might have been disabled in the process

-> you will be prompted to restart once again. Hopefully when android studio restarts the second time the preview should render.

查看更多
登录 后发表回答