I am able to resolve the above errors. Eclipse is so intelligent that it advised me to import the corresponding package to resolve it. However I am getting a new error in step 8 of this example. The add method used is not getting compiled successfully.
The line of code with error is
The error is
The method add(int, String) in the type ArrayList<String> is not applicable for the arguments (int,Editable,String)
Please help me to resolve this error.