Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>Have I uncovered an android bug?</p> </blockquote> <p>Probably not.</p> <blockquote> <p>It could be anything.</p> </blockquote> <p>No, it cannot. The stack trace points out that there is a problem in <code>ArrayAdapter</code>. Either you are creating an <code>ArrayAdapter</code> that has an issue, or you are creating something else (e.g., an <code>AlertDialog</code>) that itself is creating an <code>ArrayAdapter</code>. There can only be so many places in your code where this occurs, and presumably there are significant portions of your code that have nothing to do with <code>ArrayAdapter</code>.</p> <p>Next, you can see that the exception occurs in <code>createViewFromResource()</code>. Just from the method name and the exception, the most likely problem should have sprung to mind: you supplied an invalid layout resource ID in the <code>ArrayAdapter</code> constructor. </p> <p>Note that the "invalid layout resource ID" may not be your fault. Whenever you encounter a resource-related error in Android development, clean your project (Project > Clean from the Eclipse main menu, or <code>ant clean</code> from the command line) and try again. If the problem goes away, life is good. If the problem persists, in this case, take a good look at your <code>ArrayAdapter</code> constructor.</p> <p>You are welcome to examine <a href="https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/ArrayAdapter.java" rel="nofollow">the source code to <code>ArrayAdapter</code></a> and <code>createViewFromResource()</code> if that helps. The link points to the most recent version of that class, though you can use the "Branches" tab to find one that corresponds to whatever version of Android you happen to be running. Sometimes, if you are running on hardware, the line numbers will not match, because the device manufacturer tinkered with the class, but given the method name, you can still find the general area where the problem lies. In this case, there are relatively few things that could reasonably raise a <code>NullPointerException</code>, and so the most likely case is still that you (or the build tools) supplied an invalid layout resource ID.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload