title: NPE Navigation Drawer listView is throwing a null pointer exception
body: <p>EDIT : now it works! ArrayAdapter was waiting as third parameter a List object where instead I furnished a String[] that is an Array so does not inherits from String. 
  I am looking for a navigation Drawer that has loaded into the <code>ListView</code> a  string List1 on default, then the user can add more lists.
  Unfortunately I have this error, where no lines of my code are indicated.
  Examining the stacktrace and the only response <a href="https://stackoverflow.com/questions/27678249/android-nullpointerexception-in-a-view-or-in-an-adapter-or">vaguely similar</a>
  I draw the conclusion the error should be here, no the line</p>
  
  <blockquote>
    <p>String[] provaListaDrawer
     but I am not sure.</p>
  </blockquote>
  
  <pre><code>   String[] projection = {" DISTINCT " + UcanContract.Tasks.COLUMN_LIST};
      Cursor cursor=getContentResolver().query(UcanContentProvider.CONTENT_URI,projection,null,null,null);
      String cursorData = DatabaseUtils.dumpCursorToString(cursor);
  
      ArrayList&lt;String&gt; arrayList = new ArrayList&lt;&gt;();
  
      while(cursor.moveToNext()) {
  
  
          String list = cursor.getString(cursor.getColumnIndexOrThrow(UcanContract.Tasks.COLUMN_LIST));
  
          arrayList.add(list);
  
  
      }
      cursor.close();
  
  
  
  
      String[] hardCodedList={"ListHardcodedForDebugging"};
  
      String[] provaListaDrawer = arrayList.toArray(hardcodedList);
  
      mDrawerList.setAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.drawer_list_view,  provaListaDrawer));
  
  }
  </code></pre>
  
  <blockquote>
    <p>E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: ivano.android.com.ucan, PID: 8856
                                                                          java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
                                                                              at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:409)
                                                                              at android.widget.ArrayAdapter.getView(ArrayAdapter.java:371)
                                                                              at android.widget.AbsListView.obtainView(AbsListView.java:2363)
                                                                              at android.widget.ListView.makeAndAddView(ListView.java:1970)
                                                                              at android.widget.ListView.fillDown(ListView.java:704)
                                                                              at android.widget.ListView.fillFromTop(ListView.java:765)
                                                                              at android.widget.ListView.layoutChildren(ListView.java:1744)
                                                                              at android.widget.AbsListView.onLayout(AbsListView.java:2162)
                                                                              at android.view.View.layout(View.java:17637)
                                                                              at android.view.ViewGroup.layout(ViewGroup.java:5575)
                                                                              at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:931)
                                                                              at android.view.View.layout(View.java:17637)
                                                                              at android.view.ViewGroup.layout(ViewGroup.java:5575)
                                                                              at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
                                                                              at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
                                                                              at android.view.View.layout(View.java:17637)
                                                                              at android.view.ViewGroup.layout(ViewGroup.java:5575)
                                                                              at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:493)
                                                                              at android.view.View.layout(View.java:17637)
                                                                              at android.view.ViewGroup.layout(ViewGroup.java:5575)
                                                                              at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
                                                                              at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
                                                                              at com.android.internal.policy.DecorView.onLayout(DecorView.java:726)
                                                                              at android.view.View.layout(View.java:17637)
                                                                              at android.view.ViewGroup.layout(ViewGroup.java:5575)
                                                                              at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
                                                                              at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
                                                                              at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
                                                                              at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
                                                                              at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
                                                                              at android.view.Choreographer.doCallbacks(Choreographer.java:686)
                                                                              at android.view.Choreographer.doFrame(Choreographer.java:621)
                                                                              at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
                                                                              at android.os.Handler.handleCallback(Handler.java:751)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                              at android.os.Looper.loop(Looper.java:154)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)</p>
  </blockquote>