Error "Phones cannot be resolved or is not a field" while developing sms sending application in android?
<pre><code>import android.app.Activity;
import android.database.Cursor;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Contacts;
import android.widget.SpinnerAdapter;
import android.widget.SimpleCursorAdapter;

class OldContactsAdapterBridge extends ContactsAdapterBridge {
    SpinnerAdapter buildPhonesAdapter(Activity a) {
        String[] PROJECTION=new String[]
            {
                Contacts.Phones._ID,Contacts.Phones.NAME,Contacts.Phones.NUMBER
            };

        String[] ARGS={String.valueOf(Contacts.Phones.TYPE_MOBILE)};
        Cursor c=a.managedQuery(Contacts.Phones.CONTENT_URI,PROJECTION,Contacts.Phones.TYPE+"=?", ARGS,Contacts.Phones.NAME);

        SimpleCursorAdapter adapter=new SimpleCursorAdapter(a,android.R.layout.simple_spinner_item,c,new String[]
                                   {
                                    Contacts.Phones.NAME
                                    },new int[] 
                                              {
                                                android.R.id.text1
                                            });

        adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

        return(adapter);
    }
}
</code></pre>

<p>this is my code OldContactsAdapterBridge class.but it gives error like 
"Phones cannot be resolved or is not a field"...i am not getting this error,please help me to remove this. at every .phone it gives me error..</p>

<p>Thanks in Advance----</p>
