Note that there are some explanatory texts on larger screens.

plurals
  1. PONullPointerException on onListItemClick
    primarykey
    data
    text
    <p>I am getting a nullpointerexception randomly (i'm unable to reproduce the error consistently) in my ListActivity. StackTrace is showing an error on the first line, <code>super.onListItemClick()</code>. Not sure why this can return null?</p> <pre><code>@Override protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); for (int i = 0; i &lt; infos.size(); i++) if (i != position) l.getChildAt(i).setBackgroundColor(0xFF444444); v.setBackgroundColor(0xFF666666); // v.setClickable(true); // test.setColorFilter(Color.parseColor("#444444"), // PorterDuff.Mode.DARKEN); ApplicationInfo ai = null; ai = infos.get(position); rinfos = findActivitiesForPackage(this, ai.packageName); ResolveInfo ri = rinfos.get(0); app_package_and_name = new String[] { ri.activityInfo.packageName, ri.activityInfo.name }; } </code></pre> <p>Here is the stacktrace:</p> <pre><code>java.lang.NullPointerException at com.sonrlabs.test.sonr.SONR.onListItemClick(SONR.java:189) at android.app.ListActivity$2.onItemClick(ListActivity.java:319) at android.widget.AdapterView.performItemClick(AdapterView.java:284) at android.widget.ListView.performItemClick(ListView.java:3763) at android.widget.AbsListView$PerformClick.run(AbsListView.java:1936) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) at dalvik.system.NativeStart.main(Native Method) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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