java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView

reward: java.lang.IllegalStateException ArrayAdapter requires the resource ID to be a TextView & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & &

at Android.widget.ArrayAdapter .createViewFromResource( ArrayAdapter.java:437 ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ ♪ I love you ♪ Android.widget.ArrayAdapter .getView( ArrayAdapter.java:407 )

:: :: :: :: :: :: :: :: at Android.widget.AbsListView .obtainView( AbsListView.java:2372 )

:: :: :: :: :: :: :: :: at Android.widget.ListView .makeAndAddView( ListView.java:2052 )

I’m sorry, I’m sorry. Android.widget.ListView .fillDown( ListView.java:786 )

There’s one problem:

ArrayAdapter<String> adapte = new ArrayAdapter<String>(
  SiteActivity.this,android.R.layout.simple_list_item_2,site
);

I will be simple_ list_ item_ Change 2 to simple_ list_ item_ 1 will solve the problem and will not report an error

Refer to the causes of the problem: https://blog.csdn.net/xxg3053/article/details/6999872

Read More: