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

Error-Expected resource of type styleable [ResourceType]

2016-07-01 10:46 423 查看

错误信息

Expected resource of type styleable [ResourceType]

错误原因

最近在项目中由于要使用沉浸式通知栏,所以使用了一个工具类SystemBarTintManager,而这个工具类在项目打包的过程中提示了一个错误:Expected resource of type styleable



解决方案

在stackoverflow中发现很多人反馈这个问题,解决方案是在使用 TypedArray 的方法声明处顶部加上 @SuppressWarnings(“ResourceType”) 忽略该警告,然后就可以正常签名编译。具体做法如下:

@SuppressWarnings("ResourceType")
public SystemBarTintManager(Activity activity) {

……
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android exception