最近使用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 :-)