简体   繁体   中英

Why can't I see the layout preview in Android Studio but instead I see a 'cross' sign and am not able to add any elements?

Screenshot of what appears on clicking layout and selecting the design tab. 图片

I tried installing android studio thrice but each time I see the same 'cross' sign instead of a Hello World on the phone.

转到文件菜单->使缓存/重新启动无效->使并重新启动

The Gradle Project Sync failed because Gradle wasn't installed properly and Android Studio wouldn't install or complete the incomplete installation. So I manually reinstalled Gradle and followed the steps given on this link and the preview came back. Thanks for for helping anyways. Cheers! Install Gradle

go to build.gradle(Module:app) file check your minSdkVersion make it 17 and above and sync your gradle. in my case it solve.

your view is zoomed at 1000% which makes it go out of bounds so just zoom in or make to 50 to 70 % and it will be visible.

在此处输入图片说明

I've met this issue, try sync gradle 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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