问题:在Android studio中打开layout中的.xml时,会遇到Rendering Problems Missing styles. Is the correct theme chosen for this layout?,如图1.
原因:.xml文件theme style和选择模拟器的theme style不一致。
解决方法:查看AndroidManifest.xml文件,找到android:theme语句,查看.xml文件的theme style。 android:theme=”@android:style/Theme.Holo.Light”,如图2
在layout文件中的Preview模式下,点击Select theme,如图3
选择.xml文件的theme style (Theme.Holo.Light),点击确定就可以了。如图4