Android Studio No tab content FrameLayout found for id 问题修复
一、问题描述
这两天遇到一个无厘头的问题,使用FragmentTabHost时报错:No tab content FrameLayout found for id xxx……
首先代码肯定没问题,出现这个问题的话 eclipse 和 Android Studio 的解决方案不一样。
出错时xml文件的代码是这样的:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.cachecats.oldbook.activity.HomeActivity" >
<FrameLayout
android:id="@+id/activity_home_container"
android:layout_width="match_parent"
android:layout_height="0dp"