首页 > android.support.v4.app.FragmentTabHost添加后运行提示项目停止运行

android.support.v4.app.FragmentTabHost添加后运行提示项目停止运行

<?xml version="1.0" encoding="utf-8"?>
<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.example.administrator.myapplication.MainActivity">

<FrameLayout
    android:id="@+id/contentLayout"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"
    tools:ignore="InefficientWeight">

</FrameLayout>

<android.support.v4.app.FragmentTabHost

android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F6F6F6">
<FrameLayout
    android:id="@android:id/tabcontent"
    android:layout_width="0dp"
    android:layout_height="0dp"/>

</android.support.v4.app.FragmentTabHost>
</LinearLayout>
我刚刚开始接触安卓开发,在项目中添加android.support.v4.app.FragmentTabHost这个标签之后,测试运行项目则提示项目停止运行,删除android.support.v4.app.FragmentTabHost这个标签之后则能够正常运行项目,请问各位大神,问题出现在哪里?谢谢


你的acitivity继承自FragmentActivity了吗?


错误日志是怎样的?在哪里报错?凭空想象不来你的问题所在。就现在的信息只能判定你的项目没有把v4依赖包加进来。

【热门文章】
【热门文章】