title: Android Studio - Cannot Resolve Symbol items in Array Adapter
body: <p>I am currently trying to implement a Bluetooth connection in an Android application using a few different tutorials and am running into issues trying to add detected paired devices to a ListView for the user to choose from.  </p>
  
  <p>It is currently throwing the error "Cannot resolve symbol items" in the line below, but I'm not sure what to replace items with or if that's the only issue.
  itemsAdapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, items);</p>
  
  <p>I would really appreciate it if someone could correct my syntax in the Java code.</p>
  
  <p>Thanks!</p>
  
  <p>Java Code</p>
  
  <pre><code>package com.example.khite.wheelnav;
  
  import android.content.Intent;
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.MenuItem;
  import android.view.View;
  import android.bluetooth.BluetoothAdapter;
  import android.bluetooth.BluetoothDevice;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  import java.util.Set;
  
  public class ConnectActivity extends ActionBarActivity {
  
      private static final int REQUEST_ENABLE_BT = 1234;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_connect);
  
          // Create Bluetooth Adapter
          BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
          if (mBluetoothAdapter == null) {
                  Intent intent;
                  intent = new Intent(this, NoBluetoothActivity.class);
                  startActivity(intent);
          }
  
          // Enable Bluetooth
          if (!mBluetoothAdapter.isEnabled()) {
              Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
              startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
          }
  
          // Create an Array Adapter to Add Devices to
          ArrayAdapter&lt;String&gt; itemsAdapter;
          itemsAdapter = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, items);
  
          //Query Paired Devices
          Set&lt;BluetoothDevice&gt; pairedDevices = mBluetoothAdapter.getBondedDevices();
          // If there are paired devices
          if (pairedDevices.size() &gt; 0) {
              // Loop through paired devices
              for (BluetoothDevice device : pairedDevices) {
                  // Add the name and address to an array adapter to show in a ListView
                  itemsAdapter.add(device.getName() + "\n" + device.getAddress());
              }
          }
  
          // Add Paired Devices to a List View
          ListView listView = (ListView) findViewById(R.id.listView);
          listView.setAdapter(itemsAdapter);
      }
  
      public void openChooseFunctionActivity(View view){
          //open choose function activity
              Intent intent;
              intent = new Intent(this, ChooseFunctionActivity.class);
              startActivity(intent);
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>XML Code</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      tools:context="com.example.khite.wheelnav.ConnectActivity"&gt;
  
      &lt;Button
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Continue"
          android:id="@+id/button2"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:onClick="openChooseFunctionActivity"
          android:background="#ff8180fd"
          android:textColor="#ff000000" /&gt;
  
      &lt;ListView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/listView"
          android:layout_centerHorizontal="true" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>