解决: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.一切搞定!
找到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.一切搞定!
相关文章推荐
- Android开发之bindService()侦听service内部状态
- android 属性动画监听
- [Android]使用Dagger 2依赖注入 - 自定义Scope(翻译)
- 【Android】《第一行代码—Android》第五章总结
- android sudio 记录
- Android中布局的5种模式
- Android 相机 III-相机功能
- android131 360 02 设置中心
- android Fragment获取EditText 从软键盘中输入下一个action的监听
- [Android] Android Sutdio on Surface Pro 3
- Android Studio快捷键每日一练(4)
- android studio2.0解决办法 Plugin is too old, please update to a more recent version
- 【Android】SDK Manager 设置代理
- Android 中的 Intent
- [记录,转帖]如何在mac本上安装android sdk
- Android带刻度的可选角度进度条
- android studio更换默认的ic_launcher图标问题
- 安卓开发黄金搭档:android-studio+Genymotion模拟器
- 隐藏android系统标题栏和状态栏
- android数据存储之SharedPreferences基础