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