Solution for: error: cannot find symbol, "ArrayAdapter"

Problem:

    [javac] Compiling 3 source files to C:\xxxx\Workspace\MyApp\bin\classes
    [javac] C:\xxxx\Workspace\MyApp\src\com\akp\MyApp\MainActivity.java:22: error: cannot find symbol
    [javac]     ArrayAdapter<String> adapter;
    [javac]     ^
    [javac]   symbol:   class ArrayAdapter
    [javac]   location: class MainActivity

Solution: 

1. Open the MainActivity.java file and add the below line of code to the imports section. 

import android.widget.ArrayAdapter;

2. Compile and test the app.