hi, i am getting an error on my ant build -

AndroidManifest.xml:5: No resource found for attribute 'name' in
package 'android'
here is the manifest

 <manifest xmlns:android="http://schemas.android.com/apk/res/android";
    package="com.google.android">
    <uses-permission id="android.permission.READ_CONTACTS"/>
    <application>
        <activity android:name="DisplayPhones"
android:label="DisplayThePhones">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

here is the file DisplayPhones.java

package com.google.android;
import java.util.ArrayList;
import java.util.List;

import android.app.ListActivity;
import android.database.Cursor;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.DateUtils;
import android.widget.ListView;
import android.widget.ArrayAdapter;

public class DisplayPhones extends ListActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.notepad_list);
// Querying for a cursor is like querying for any SQL-Database
Cursor c = getContentResolver().query(
android.provider.Contacts.Phones.CONTENT_URI,
null, null, null,
android.provider.Contacts.Phones.NUMBER+ " DESC");
startManagingCursor(c);

// Retrieve the column-indixes of phoneNumber, name and type
int numberColumn =
c.getColumnIndex(android.provider.Contacts.Phones.NUMBER);
int nameColumn =
c.getColumnIndex(android.provider.Contacts.Phones.NAME);
// type can be: home, cell, etc (number provided - must be
interpreted
int typeColumn =
c.getColumnIndex(android.provider.Contacts.Phones.TYPE);

// Will hold the calls, available to the cursor
List<String> pList = new ArrayList<String>();

// Loop through all entries the cursor provides to us.
if(c.first()){
do{
String callerPhoneNumber = c.getString(numberColumn);
String pname = c.getString(nameColumn);
int pType = c.getInt(typeColumn);
pList.add("@ " + " | # " + callerPhoneNumber +"  " +  pname  );
}while(c.next());
}
ArrayAdapter<String> la = new
ArrayAdapter<String>(this,R.layout.notes_row,pList);
this.setListAdapter(la);
}
}

thank you!
franw

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to