Android studio layout Design view not loading

梦想的初衷 提交于 2020-06-12 10:46:23

问题


I'm using Android Studio 3.2.1 version. The loading .xml layout.attached screenshot.

Android Studio .xml screenshot:

android studio .xml

Android Studio waiting screenshot:

android studio waiting


回答1:


this type of problem is reoccurring with android studio, plenty of answers given to plenty of people who just asked, not trying to do their own research, anyways the easiest solution but may not be the best would be to change the theme style. In the root directory go to "res" > "values" > "styles.xml" and there change the theme line to be this:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

let us know if it solved your problem otherwise we can suggest other solutions




回答2:


I think it would be better if you could look into the issue which is causing this problem from the list identified below :

1.) Is it a rendering problem

Check if the screen being rendered into the Android Studio Design mode. If that is not the case look for android version in the above menu and from the drop down chose another version of Android API Level. If there are no other version present you should go to SDK Manager and Download a complete version.

2.) You see a Custom View in the outline on the right hand side

To solve this problem I recommend you to go to the Code View and replace the Custom View with LinearLayout.

Now you can try to drag and drop the Widgets .




回答3:


I faced the same problem few months back though after updating my Android Studio I didn't get any problem like this. So the best way I Used to solve this problem.

Go to the root directory go to "res" > "values" > "styles.xml" and there add the "Base." in front of "Theme.AppCompat.Light.DarkActionBar" inside paretn

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

I hope this will solve your problem. :)



来源:https://stackoverflow.com/questions/53347480/android-studio-layout-design-view-not-loading

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