Activity_main.xml not showing and Gradle doesn't finish initial build

℡╲_俬逩灬. 提交于 2021-01-07 03:11:58

问题


Hi im kinda new to android studio and im trying to learn from tutorials on youtube but i cant seem to do it because the activity_main.xml is not opening up and stuck at waiting for build to finish... ive been waiting for like an hour now and not certain what to do i also tried reinstalling it but nothing happened and stuck at this:


回答1:


Android Studio preview needs at least one success build in order to show the Preview.

Go to Build -> Rebuild project then check if there is any issues then run the app on an emulator (Or a real device) after, you'll be able to see the preview if your dependencies has no problem.




回答2:


The Design view need to finish the Gradle build.

You can use this solution-

add this line in gradle.propertise

    org.gradle.daemon=true
    org.gradle.parallel=true

Then build again.

This is Gradle properties

Edit

Check out this photo. Does your gradle setting look like that-



来源:https://stackoverflow.com/questions/52905774/activity-main-xml-not-showing-and-gradle-doesnt-finish-initial-build

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