Error when inflating android.support.design.widget.TextInputLayout
2015-12-17 16:10
751 查看
起因:
今天使用android design support lib,写个使用textinputlayout的小demo,在画完布局之后一直报错
I've encountered the same problem. Make sure that you're using an AppCompat theme and that you are inflating the view in an AppCompatActivity context.
原地址:点击打开链接
2016.1.9 再次掉入此坑,原因是找不到要加载的design support lib中的类,因为之前遇到过此类问题,我以为是没有继承appcompatactivity或者是主题样式没有继承theme.appcompat,但是发现这些都没有问题,一度导致不知道怎么解决,重看代码:
发现如果布局文件中如果有错误的话,也会导致这个问题的出现。检查完布局文件中没有错误了,clean一下工程进行测试。
今天使用android design support lib,写个使用textinputlayout的小demo,在画完布局之后一直报错
Error when inflating android.support.design.widget.TextInputLayout
,一直找不到原因,最后百度得知:I've encountered the same problem. Make sure that you're using an AppCompat theme and that you are inflating the view in an AppCompatActivity context.
原地址:点击打开链接
2016.1.9 再次掉入此坑,原因是找不到要加载的design support lib中的类,因为之前遇到过此类问题,我以为是没有继承appcompatactivity或者是主题样式没有继承theme.appcompat,但是发现这些都没有问题,一度导致不知道怎么解决,重看代码:
发现如果布局文件中如果有错误的话,也会导致这个问题的出现。检查完布局文件中没有错误了,clean一下工程进行测试。
相关文章推荐
- AndroidStudio v1.4+ 使用笔记
- 收藏一些大神博客
- Android中软键盘弹出时底部菜单上移问题
- Android 干货集
- Android 自动化测试——Monkey测试
- Android studio 导入github工程
- 【转】Android 程序退出的办法
- 编译打包android工程步骤
- Android 启动白屏问题解决
- Android Toast工具类
- Android自定义控件--波浪球SurfaceView实现
- android Baseadapter 和 ViewHolder的使用
- Gradle Plugin Samples 之 Gradle Unit Test(七)
- 从一个Activity中得到结果
- Android Unit Test
- Android RecyclerView 使用完全解析 体验艺术般的控件
- android的Log详解(Log.v Log.d Log.i Log.w Log.e)
- Android onSaveInstanceState()
- Intellij IDEA配置Android Annotations注解框架
- Gradle Plugin Samples 之Gradle Library Projects(四)