title: How to fix "array type expected found java.util.arraylist"?
body: <p>Given the function as below, AndroidStudio gives an error in the labeled line:</p>
  
  <pre><code>array type expected found java.util.arraylist
  </code></pre>
  
  <p>I also tried to use <code>get</code> instead of a direct referencing, but then Android Studio is telling me something that <code>setItems</code> cannot be resolved. The code is here:</p>
  
  <pre><code>protected void multiSelect(final ArrayList items) {
      AlertDialog.Builder builder = new AlertDialog.Builder(this);
  
      builder.setTitle("Selection")
              .setItems(items, new DialogInterface.OnClickListener() {
                  public void onClick(DialogInterface dialog, int item) {
                      Log.i("Select", "Selected entry: " + items[item]); // error here
                  }
              });
  
      builder.create();
  }
  </code></pre>