Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/10.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.IllegalArgumentException:帐户不能为空)_Android_Database_Android Sqlite - Fatal编程技术网

android应用程序因数据库java崩溃。(lang.IllegalArgumentException:帐户不能为空)

android应用程序因数据库java崩溃。(lang.IllegalArgumentException:帐户不能为空),android,database,android-sqlite,Android,Database,Android Sqlite,我需要一些代码方面的帮助,因为工作正常,但在打开收藏夹列表时崩溃 有什么想法吗??日志猫说: 原因:android.view.InflateException:二进制XML文件行#20:ScrollView只能承载一个直接子级 原因:java.lang.IllegalStateException:ScrollView只能承载一个直接子级 因此,将您的活动\u favorite.xml更改为这一个,它应该会起作用 如果使用的是ScrollView请确保其中只有一个子项,然后可以在其中添加多个

我需要一些代码方面的帮助,因为工作正常,但在打开收藏夹列表时崩溃 有什么想法吗??

日志猫说:

原因:android.view.InflateException:二进制XML文件行#20:ScrollView只能承载一个直接子级 原因:java.lang.IllegalStateException:ScrollView只能承载一个直接子级

因此,将您的
活动\u favorite.xml
更改为这一个,它应该会起作用


如果使用的是
ScrollView
请确保其中只有一个子项,然后可以在其中添加多个子项

<ScrollView
    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"
    android:padding="16dp"
    tools:context=".Favorites">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <TextView
            android:id="@+id/no_movies_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/no_fav_movies"
            android:visibility="invisible" />

        <TextView
            android:id="@+id/favorite_movie_tv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </LinearLayout>

</ScrollView>