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:
- Android error java.lang.IllegalStateException : System services not available to Activities before onC
- java.lang.IllegalStateException: Could not execute method for android:onClick
- java.lang.IllegalStateException : unable to read meta data for class
- Spring boot running appears java.lang.IllegalStateException : Failed to load ApplicationContext
- java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @Context
- java.lang.IllegalStateException Exception: cause analysis and solution
- Idea start error: java.lang.IllegalStateException : failed to create a child event loop
- java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
- java.lang.IllegalStateException: Logback configuration error detected
- Caused by: java.lang.IllegalStateException: Ambiguou There is already ‘XXXXXXController‘ bean method
- build.gradle Warming: cannot be applied to ‘(groovy.lang.Closure)’/'(java.lang.String)’
- java.lang.IllegalArgumentException: column ‘_id’ does not exist
- java.lang.IllegalArgumentException : could not get next sequenced ID for sequence name: Visitor solution
- There is no getter for property named ‘id‘ in ‘class java.lang.Integer‘
- [Solved] Flowable Start Error: ClassCastException: java.time.LocalDateTime cannot be cast to java.lang.String
- Solutions to couldn’t resolve resource @ ID / visible
- java.lang.NoSuchMethodError: org.json.JSONObject.put(Java/lang/String; Java/util/Collection;) “209151;”
- Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError
- There is a solution to the problem: severity = corrected, type = physical layer, id = 00e5 or id = 00e8 (receiver ID) under Ubuntu
- How to keep textview and ImageView on the same line