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

Android Studio - 布局文件预览异常Unable to locate mode 0

2016-11-10 15:05 393 查看
最近使用android studio2.2创建项目时发现布局文件 无法预览,出现

Exception raised during rendering: Unable to locate mode 0


在Stack Overflow上看到有人跟我遇到同样的问题,他的问题在这Android Studio - Exception raised during rendering: Unable to locate mode 0

出现此问题的原因是我使用的构建工具的版本是25.0.0,将其改为24.2.1就可以了。

以下是那个人的解决办法

its because of the version of your build tool : 25.0.0
go to gralde.build and change it to 24.1.1
and let it download this version of build tool : 24.2.1

then change these codes :
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
to :
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'

then sync once !
Booom its correct now :-)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  布局预览异常
相关文章推荐