Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/194.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android java.lang.RuntimeException:无法在xml布局中启动活动组件信息_Android_Android Layout - Fatal编程技术网

Android java.lang.RuntimeException:无法在xml布局中启动活动组件信息

Android java.lang.RuntimeException:无法在xml布局中启动活动组件信息,android,android-layout,Android,Android Layout,我在Google Play上有一个应用程序。我有一种感觉。一切正常。突然,我在下面的xml中第一个控件的第一行出现了3个错误。我不知道为什么会发生这种情况,在其他安卓设备上工作正常。有什么想法吗 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fil

我在Google Play上有一个应用程序。我有一种感觉。一切正常。突然,我在下面的xml中第一个控件的第一行出现了3个错误。我不知道为什么会发生这种情况,在其他安卓设备上工作正常。有什么想法吗

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/black_text"
    >

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@color/black_text"
        android:layout_above="@+id/relativeView_fav_shows"
        >
        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_centerVertical="true"
            android:scaleType="centerCrop"
            android:src="@drawable/background_channel"
            />

        <GridView xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/gridview_channelView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:numColumns="2"
            android:verticalSpacing="5dp"
            android:horizontalSpacing="5dp"
            android:stretchMode="columnWidth"
            android:listSelector="@null"
            android:layout_marginTop="6dp"
            android:gravity="center"
            >

        </GridView>

    </RelativeLayout>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@color/black_text"
            android:layout_below="@+id/gridview_channelView"
            android:layout_alignParentBottom="true"
            android:id="@+id/relativeView_fav_shows"
            >
            <ImageView
                android:id="@+id/imageView_favShows"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:src="@drawable/fav_shows_normal"
                />
    </RelativeLayout>
</RelativeLayout>

Thankx

此下面的标记应仅在顶部父布局中可用,请将其从所有其他Laoyts/视图中删除

xmlns:android="http://schemas.android.com/apk/res/android"

这可能是错误的原因,请也发布logcat输出。

此下面的标记应仅在顶部父布局中可用,请将其从所有其他Laoyts/视图中删除

xmlns:android="http://schemas.android.com/apk/res/android"

这可能是错误的原因,请也发布logcat输出。

@Ankit。。但为什么错误不会发生在所有的安卓设备上呢?我说的是推荐,这就是安卓的优点,所有设备的行为都不一样。。。尝试一下,让我知道它是否导致了问题。请添加您的活动创建,因为问题仍然存在。。我刚收到另一份坠机报告。。进一步猜猜为什么会发生这种情况?在哪部手机上会出现这种错误。我有一些手机可以使用,如果你能发送应用程序,它可以帮助你调试。。但为什么错误不会发生在所有的安卓设备上呢?我说的是推荐,这就是安卓的优点,所有设备的行为都不一样。。。尝试一下,让我知道它是否导致了问题。请添加您的活动创建,因为问题仍然存在。。我刚收到另一份坠机报告。。进一步猜猜为什么会发生这种情况?在哪部手机上会出现这种错误。我有一些手机可供使用,如果你可以发送应用程序,可以帮助你进行调试。