error in ant build - No resource found for attribute 'name'

Put your problem here if it does not fit any of the other categories.

error in ant build - No resource found for attribute 'name'

Postby franw » Thu Mar 27, 2008 11:45 pm

help!
ported to mc5 and it wont build -
error is

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);


}
}


thanks in advance !
franw
franw
Freshman
Freshman
 
Posts: 6
Joined: Mon Mar 24, 2008 6:36 pm
Location: NewYork

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests