我的37行就是那个<fragment标签,我自己忘了贴,抱歉。还有,您给我推荐的那个网址我看了下,我用的是android studio ,好像找不到那个选项啊?
安卓布局放置fragment后调试无法通过
在activity_main.xml中放置一个fragment的布局,但是调试的时候出现了错误: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.ticky.myapplication/com.example.ticky.myapplication.Home}: android.view.InflateException: Binary XML file line #37: Error inflating class fragment
是因为我的fragment文件没有声明吗?
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
3条回答
为你推荐
- 关于Android ViewPager+Fragment,在Fragment里弹框的问题
- cannot cast "androidx fragment" to "support fragment"
- Android menu上的按钮能否实现点击跳转Fragment?
- android
- 1个回答
- android 错误: 不兼容的类型: ImageFragment无法转换为Fragment
- android-studio
- 1个回答
- 安卓:在Fragment中使用Webview嵌入网页
- Android从Fragment跳转到Activity,点击按钮无反应
- android
- fragment切换
- 5个回答
- 在安卓开发中,关于active转换成fragment
- android
- fragment
- fragment切换
- 2个回答
- 关于安卓开发中谷歌地图在 android fragment
- Android 如何在RecyclerView中添加Fragment?
- android
- 7个回答
- Fragment中的上下滑动事件会被上一个Fragment响应而不是当前的,怎么办
- viewpager
- android
- fragment
- 布局
- 滑动事件
- 1个回答
- 运行后老说无法加载那个布局
- android 布局和控件重叠响应问题
- android
- 控件
- 布局
- relativelayout
- 6个回答
- android中用fragment 替换 布局中的LinearLayout,然后如何换回来???
- android
- 布局
- 2个回答
- android 无法转换为android.support.v4.app.Fragment
- android
- 3个回答
- Android动态添加fragment时如何设置fragment的id
- android
- 4个回答
- android context怎么转换为fragment
- 3个回答
- 安卓开发 如何在代码中动态切换fragment加载的布局文件?
- android
- 5个回答
- 我的Android studio 使用不了Fragment
- android-studio
- 4个回答
- Android中fragment怎么嵌套子fragment
- android
- 1个回答
- android fragment内部控件跳转fragment 如何替换标题
- android
- fragment 标题
- 4个回答