您的位置:首页 > 移动开发 > Android开发

解决:Android Studio 不能预览

2016-01-02 22:29 531 查看
关于无法预览布局文件,是很苦恼的,有一种快速解决办法:

找到res -> values ->styles.xml,进入styles.xml,将<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
改为:
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>


其实就是在Theme前面加上Base.即可。

ps:据说出现此种现象是引入的V7包版本太新而adt版本太老导致,可以更新adt版本,但是害怕麻烦的话,就直接改styles.xml即可,在Theme前面加上Base.一切搞定!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: