且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

渲染期间引发的异常:二进制XML文件行#-1:错误夸大类< unknown>

更新时间:2022-03-29 09:20:53

UPDATE Sep/2016

问题在Android Studio v2.2上不再可重现.更新您的Android Studio,该问题将不再重现.

Issue is no longer reproducible on Android Studio v2.2. Update your Android Studio and the issue will be no longer reproducible.

2016年8月更新

问题仍在Android Studio v2.1.3中发生

Issue is still happening in Android Studio v2.1.3

原始答案

这似乎是一个问题,由Google HERE处理:

It seems this is an issue and it is being handled by google HERE:

其他一些人也面临着同样的问题,解决方法是始终将预览API从24更改为23(或任何其他版本).

Some other people are facing the same issue and the fix is always to change the preview API from 24 to 23 (or any other version).

您可能需要下载早期版本的SDK..您不需要更改自己的build.gradle ......只需下载SDK,Android Studio即可让您更改SDK.在布局预览中

You may need to download a previous version of SDK.. You don't need to change your build.gradle... Just download the SDK and Android Studio will allow you to change the SDK in Layout Preview