活动崩溃oncall

时间:2018-01-10 08:40:03

标签: android

我正在调用MainActivity.java中的一个活动,但它崩溃了。下面是logcat错误。没有理解实际问题在哪里,所有命名都是正确的,活动和布局都是正确命名的,没有编译时错误。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:baselineAligned="false"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <fragment
        android:id="@+id/fragment_videoplayer"
        android:name="com.s2s.doupnow.VideoPlayerFragment"
        android:layout_height="200dp"
        android:layout_width="match_parent"/>

    <fragment
        android:id="@+id/fragment_videodescription"
        android:name="com.s2s.doupnow.VideoDescriptionFragment"
        android:layout_height="0dp"
        android:layout_width="match_parent"
        android:layout_weight="1" />
</LinearLayout>

activity_videoplay.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#fcfcfc" >

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin" >

            <TextView
                android:id="@+id/fragmentvideodescription_titletextview"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="50dp"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="10dp"
                android:orientation="horizontal" >

                <TextView
                    android:id="@+id/fragmentvideodescription_viewstextview"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginRight="15dp"
                    android:textAppearance="?android:attr/textAppearanceSmall" />
            </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="10dp"
            android:orientation="horizontal" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="5dp"
                android:drawableLeft="@drawable/ic_file_download"
                android:drawableTint="@color/colorPrimary"
                android:backgroundTint="@color/colorPrimary"
                android:gravity="center_horizontal"
                android:text="" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="5dp"
                android:paddingLeft="@dimen/activity_horizontal_gap"
                android:drawableLeft="@drawable/ic_thumb_up"
                android:gravity="center_horizontal"
                android:drawableTint="@color/colorPrimary"
                android:backgroundTint="@color/colorPrimary"
                android:text="" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginBottom="5dp"
                android:paddingLeft="@dimen/activity_horizontal_gap"
                android:drawableLeft="@drawable/ic_share"
                android:gravity="center_horizontal"
                android:drawableTint="@color/colorPrimary"
                android:backgroundTint="@color/colorPrimary"
                android:text="" />
        </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="2dp"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="10dp"
                android:background="@color/colorPrimary" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                android:text="@string/textview_description"
                android:textStyle="bold"
                android:textColor="@color/colorPrimary"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textSize="20sp" />

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recyclerview1"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" />
        </LinearLayout>
    </ScrollView>

</LinearLayout>

fragment_videodescription.xml

char c = 'a';
System.Uri.IsHexDigit(c);

1 个答案:

答案 0 :(得分:0)

解决了问题,实际问题是可绘制文件,可绘制文件是v24格式,删除并再次创建,错误发生了。 thnx