Android Studio 报Integer types not allowed错误
更新时间:2017年10月11日 08:51:43 作者:蓝色的雪啦
本文给大家分享的是在使用Android Studio的过程中遇到的报Integer types not allowed错误的分析及解决方法,非常实用,有需要的小伙伴可以参考下
Android Studio 报错
Error:(25, 5) Integer types not allowed (at 'android:textSize' with value '12').
代码
<style name="HorizontalBtnLayout">
<item name="android:layout_height">match_parent</item>
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:textSize">12</item>
</style>
分析:
1.是不是<style> </style>标签内不能使用android:textSize,系统有提示,说明可以的
2.根据报错Integer tyes is not allowed,考虑到是不是类型有问题,😝,改为12sp已ok
3,记得一定带单位
<item name="android:textSize">12sp</item>
相关文章
Android Material Design 阴影实现示例
这篇文章主要介绍了Android Material Design 阴影实现示例,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧2018-04-04
Android关于SeekBar无法点击到最大值问题解决方法记录(推荐)
这篇文章主要介绍了Android关于SeekBar无法点击到最大值问题解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2019-04-04
Android View源码解读 DecorView与ViewRootImpl浅谈
这篇文章主要解读了Android View源码,为大家详细介绍DecorView与ViewRootImpl,具有一定的参考价值,感兴趣的小伙伴们可以参考一下2017-02-02


最新评论