在Android Studio中新建了一个 setting.xml 文件,布局好文件后,从 Text 界面切换到 Design 界面,显示了如下错误:
Android学习笔记(4)----Rendering Problems(The graphics preview in the layout editor may not be accurate)

网上搜寻 The graphics preview in the layout editor may not be accurate,还是没有解决该问题,后来想到自己新建的工程的 minSDKVersion 是15,而 Design界面中选择的渲染 API 是24,就想会不会是选择的渲染 API 太高了呢?就将渲染 API 调整成了15,结果如图:

Android学习笔记(4)----Rendering Problems(The graphics preview in the layout editor may not be accurate)

还是有错误。
于是将渲染 API 调整成20:
Android学习笔记(4)----Rendering Problems(The graphics preview in the layout editor may not be accurate)

界面就正确显示了。

认真试了一遍,API 16,17,18,19,20 都可以正常显示,其它 API 都会出现问题:
Android学习笔记(4)----Rendering Problems(The graphics preview in the layout editor may not be accurate)

相关文章: