Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一个ActivityGroup套4个activity,在其中的一个HomeActivity加入你的库和默认主题,一进来就崩溃 #93

Open
vance0901 opened this issue Dec 13, 2019 · 0 comments

Comments

@vance0901
Copy link

Process: com.chuzu.client, PID: 9641
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.chuzu.client/com.chuzu.client.activity.main.MainActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.chuzu.client/com.chuzu.client.activity.home.HomeActivity}: android.view.InflateException: Binary XML file line #23: Binary XML file line #23: Error inflating class <unknown>
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3118)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3253)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1996)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7053)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)
 Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.chuzu.client/com.chuzu.client.activity.home.HomeActivity}: android.view.InflateException: Binary XML file line #23: Binary XML file line #23: Error inflating class <unknown>
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3118)
    at android.app.ActivityThread.startActivityNow(ActivityThread.java:2919)
    at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:139)
    at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:366)
    at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:774)
    at android.widget.TabHost.setCurrentTab(TabHost.java:428)
    at android.widget.TabHost.addTab(TabHost.java:238)
    at com.chuzu.client.activity.main.MainActivity.onCreate(MainActivity.java:82)
    at android.app.Activity.performCreate(Activity.java:7255)
    at android.app.Activity.performCreate(Activity.java:7246)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3098)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3253) 
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1996) 
    at android.os.Handler.dispatchMessage(Handler.java:106) 
    at android.os.Looper.loop(Looper.java:224) 
    at android.app.ActivityThread.main(ActivityThread.java:7053) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876) 
 Caused by: android.view.InflateException: Binary XML file line #23: Binary XML file line #23: Error inflating class <unknown>
 Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class <unknown>
 Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Constructor.newInstance0(Native Method)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
    at android.view.LayoutInflater.createView(LayoutInflater.java:656)
    at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:765)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:833)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:775)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:908)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:911)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:911)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:869)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:521)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
    at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:463)
    at android.app.Activity.setContentView(Activity.java:2792)

2019-12-13 17:25:11.130 9641-9641/com.chuzu.client E/AndroidRuntime: at com.chuzu.client.activity.main.BaseActivity.onCreate(BaseActivity.java:56)
at com.chuzu.client.activity.home.HomeActivity.onCreate(HomeActivity.java:403)
at android.app.Activity.performCreate(Activity.java:7255)
at android.app.Activity.performCreate(Activity.java:7246)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3098)
at android.app.ActivityThread.startActivityNow(ActivityThread.java:2919)
at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:139)
at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:366)
at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:774)
at android.widget.TabHost.setCurrentTab(TabHost.java:428)
at android.widget.TabHost.addTab(TabHost.java:238)
at com.chuzu.client.activity.main.MainActivity.onCreate(MainActivity.java:82)
at android.app.Activity.performCreate(Activity.java:7255)
at android.app.Activity.performCreate(Activity.java:7246)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3098)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3253)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1996)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7053)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}
at android.content.res.TypedArray.getColorStateList(TypedArray.java:546)
at android.widget.TextView.readTextAppearance(TextView.java:3574)
at android.widget.TextView.(TextView.java:945)
at android.widget.Button.(Button.java:166)
at android.widget.Button.(Button.java:141)
at android.widget.Button.(Button.java:117)
... 46 more
下面是xml:

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="460pt">



    <com.youth.banner.Banner
        android:id="@+id/zhufang_pic"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_centerHorizontal="true" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"    <-------------这里是23行
        android:orientation="vertical">

        <View
            android:id="@+id/top_view"
            android:layout_width="match_parent"
            android:layout_height="0pt" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/title_bar"
        android:layout_width="match_parent"
        android:layout_height="100pt"
        android:orientation="horizontal">


        <ImageView
            android:layout_width="32pt"
            android:layout_height="36pt"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="24pt"
            android:src="@drawable/dingwei_icon"></ImageView>

        <TextView
            android:id="@+id/city"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="10pt"
            android:lines="1"
            android:text="深圳市"
            android:textColor="@color/white"
            android:textSize="30pt">


        </TextView>

        <ImageView
            android:layout_width="18pt"
            android:layout_height="11pt"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="10pt"
            android:src="@drawable/xiangxia"></ImageView>


        <LinearLayout
            android:id="@+id/shousuokuang"
            android:layout_width="420pt"
            android:layout_height="64pt"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="10pt"
            android:background="@drawable/bg_shousuokuang"
            android:gravity="center"
            android:orientation="horizontal"

            >

            <ImageView
                android:layout_width="33pt"
                android:layout_height="33pt"
                android:src="@drawable/shousuo">

            </ImageView>


            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="18pt"
                android:text="请输入搜索信息"
                android:textColor="#FF909399"
                android:textSize="30pt"

                ></TextView>


        </LinearLayout>

        <ImageView
            android:layout_width="31pt"
            android:layout_height="39pt"
            android:layout_gravity="center_vertical"
            android:layout_marginLeft="50pt"
            android:src="@drawable/tongzhi"></ImageView>


    </LinearLayout>


</FrameLayout>


<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="140pt"
    android:background="@color/white"
    android:orientation="horizontal">

    <LinearLayout
        android:id="@+id/home_layout"
        android:layout_width="0pt"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">


        <ImageView
            android:layout_width="66pt"
            android:layout_height="60pt"
            android:src="@drawable/icon_home"></ImageView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="HOME"
            android:textColor="#FF303133"
            android:textSize="26pt"

            ></TextView>


    </LinearLayout>

    <LinearLayout
        android:id="@+id/qiuzhi_layout"
        android:layout_width="0pt"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">


        <ImageView
            android:layout_width="66pt"
            android:layout_height="60pt"
            android:src="@drawable/icon_qiuzhi"></ImageView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="求职"
            android:textColor="#FF303133"
            android:textSize="26pt"

            ></TextView>


    </LinearLayout>

    <LinearLayout
        android:id="@+id/xiaopu_layout"
        android:layout_width="0pt"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">


        <ImageView
            android:layout_width="66pt"
            android:layout_height="60pt"
            android:src="@drawable/icon_xiaopu"></ImageView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="小铺"
            android:textColor="#FF303133"
            android:textSize="26pt"

            ></TextView>


    </LinearLayout>

    <LinearLayout
        android:id="@+id/lvyou_layout"
        android:layout_width="0pt"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">


        <ImageView
            android:layout_width="66pt"
            android:layout_height="60pt"
            android:src="@drawable/icon_lvyou"></ImageView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="旅游"
            android:textColor="#FF303133"
            android:textSize="26pt"></TextView>


    </LinearLayout>

    <LinearLayout
        android:id="@+id/jiudian_layout"
        android:layout_width="0pt"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:orientation="vertical">


        <ImageView
            android:layout_width="66pt"
            android:layout_height="60pt"
            android:src="@drawable/icon_jiudian"></ImageView>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="酒店"
            android:textColor="#FF303133"
            android:textSize="26pt"></TextView>


    </LinearLayout>


</LinearLayout>

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="24pt"
    android:layout_marginTop="20pt"
    android:text="ONELAND"
    android:textColor="#FF303133"
    android:textSize="36pt"
    android:textStyle="bold"></TextView>


<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/f6"
    android:orientation="vertical">

    <!--首页帖子类型-->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="154pt"
        android:layout_marginLeft="24pt"
        android:layout_marginTop="20pt"
        android:layout_marginRight="24pt"
        android:orientation="horizontal">

        <RelativeLayout
            android:id="@+id/meishi_layout"
            android:layout_width="0pt"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/white">

            <TextView
                android:id="@+id/meishitext"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24pt"
                android:layout_marginTop="34pt"
                android:text="美食"
                android:textColor="#FF303133"
                android:textSize="32pt"></TextView>

            <TextView
                android:id="@+id/meishitiezi"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/meishitext"
                android:layout_alignLeft="@+id/meishitext"
                android:layout_marginTop="10pt"
                android:text="28条帖子"
                android:textColor="#FF909399"
                android:textSize="26pt"></TextView>

            <ImageView
                android:layout_width="100pt"
                android:layout_height="100pt"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="47pt"
                android:src="@drawable/icon_meishi"></ImageView>


        </RelativeLayout>


        <RelativeLayout
            android:id="@+id/xingqu_layout"
            android:layout_width="0pt"
            android:layout_height="match_parent"
            android:layout_marginLeft="10pt"
            android:layout_weight="1"
            android:background="@color/white">

            <TextView
                android:id="@+id/meishitext_2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24pt"
                android:layout_marginTop="34pt"
                android:text="兴趣部落"
                android:textColor="#FF303133"
                android:textSize="32pt"></TextView>

            <TextView
                android:id="@+id/xingqu_tiezi"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/meishitext_2"
                android:layout_alignLeft="@+id/meishitext_2"
                android:layout_marginTop="10pt"
                android:text="28条帖子"
                android:textColor="#FF909399"
                android:textSize="26pt"></TextView>

            <ImageView
                android:layout_width="100pt"
                android:layout_height="100pt"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="47pt"
                android:src="@drawable/icon_xingqu"></ImageView>

        </RelativeLayout>


    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="154pt"
        android:layout_marginLeft="24pt"
        android:layout_marginTop="20pt"
        android:layout_marginRight="24pt"
        android:orientation="horizontal">

        <RelativeLayout
            android:id="@+id/jiaoyou_layout"
            android:layout_width="0pt"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@color/white">

            <TextView
                android:id="@+id/meishitext_4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24pt"
                android:layout_marginTop="34pt"
                android:text="相亲交友"
                android:textColor="#FF303133"
                android:textSize="32pt"></TextView>

            <TextView
                android:id="@+id/jiaoyou_tiezi"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/meishitext_4"
                android:layout_alignLeft="@+id/meishitext_4"
                android:layout_marginTop="10pt"
                android:text="28条帖子"
                android:textColor="#FF909399"
                android:textSize="26pt"></TextView>

            <ImageView
                android:layout_width="100pt"
                android:layout_height="100pt"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="47pt"
                android:src="@drawable/icon_jiaoyou"></ImageView>


        </RelativeLayout>


        <RelativeLayout
            android:id="@+id/chongwu_layout"
            android:layout_width="0pt"
            android:layout_height="match_parent"
            android:layout_marginLeft="10pt"
            android:layout_weight="1"
            android:background="@color/white">

            <TextView
                android:id="@+id/meishitext_6"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="24pt"
                android:layout_marginTop="34pt"
                android:text="宠物"
                android:textColor="#FF303133"
                android:textSize="32pt"></TextView>

            <TextView
                android:id="@+id/chongwu_tiezi"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/meishitext_6"
                android:layout_alignLeft="@+id/meishitext_6"
                android:layout_marginTop="10pt"
                android:text="28条帖子"
                android:textColor="#FF909399"
                android:textSize="26pt"></TextView>

            <ImageView
                android:layout_width="100pt"
                android:layout_height="100pt"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginRight="47pt"
                android:src="@drawable/icon_chongwu"></ImageView>

        </RelativeLayout>


    </LinearLayout>
</LinearLayout>

<com.flyco.tablayout.CommonTabLayout
    android:id="@+id/tl_1"
    android:layout_width="375pt"
    android:layout_height="wrap_content"
    android:paddingLeft="40pt"
    android:paddingTop="30pt"
    android:paddingRight="40pt"
    android:paddingBottom="30pt"
    tl:tl_iconVisible="false"
    tl:tl_indicator_color="#FFFFC35A"
    tl:tl_textSelectColor="#FF303133"
    tl:tl_textUnselectColor="#FF303133"
    tl:tl_underline_color="#FFFFC35A"
    tl:tl_underline_height="0pt" />

<android.support.v4.view.ViewPager
    android:id="@+id/vp_2"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />


<!--<Button
    android:id="@+id/dingwei"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="地理位置"
    android:textSize="40pt"></Button>


<Button
    android:id="@+id/zufang"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="租房"
    android:textSize="40pt"></Button>

<Button
    android:id="@+id/fabuzufang"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="发布租房"
    android:textSize="40pt"></Button>


<Button
    android:id="@+id/zhaopin"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="招聘"
    android:textSize="40pt"></Button>-->
可以加qq:2970308762或微信:15017937064详聊,谢谢
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant