小编Neh*_*eha的帖子

如何在Eclipse中更改API级别8到3

我正在使用eclipse for android我的API级别为8,我尝试了project-> properties-> android->但是在这里它只显示了API级别8的一个复选框.请指导我做什么?

eclipse android

4
推荐指数
1
解决办法
1万
查看次数

打开eclipse时出错

当我尝试打开eclipse它时,它会显示一个错误,即Android SDK content Loader has encountered a problem.parseSdkContent failed

当我点击详细信息按钮时,它会显示给我parseSdkContent failed java.lang.NullPointeException.

当我尝试创建AVD时,它显示错误,Location of the android SDK has not been setup in the preferences而我已经在首选项中设置了路径.

请帮我.由于这个问题,我的工作正在等待中.

eclipse android android-2.2-froyo

4
推荐指数
1
解决办法
1万
查看次数

如何在ListView中显示手机通讯录

以下是我的代码,实际上在屏幕上它没有向我显示任何联系.在模拟器中我添加了5个联系人.请告诉我该怎么办.

{
    //some code
    Cursor cur = getContacts();
    String[] fields = new String[] {ContactsContract.Data.DISPLAY_NAME};
    SimpleCursorAdapter adapter = 
        new SimpleCursorAdapter(this, 
                                R.layout.list_view_item_new,
                                cur,
                                fields,
                                new int[] {R.id.contactEntryText});
    lv.setAdapter(adapter);
}

private Cursor getContacts() {  
    // Run query     
    Uri uri = ContactsContract.Contacts.CONTENT_URI;
    String[] projection = 
        new String[]{ ContactsContract.Contacts._ID,
                      ContactsContract.Contacts.DISPLAY_NAME }; 
    String selection = null;
    String[] selectionArgs = null;  
    String sortOrder = ContactsContract.Contacts.DISPLAY_NAME + 
        " COLLATE LOCALIZED ASC";  
    return managedQuery(uri, projection, selection, selectionArgs, sortOrder);  
}
Run Code Online (Sandbox Code Playgroud)

android listview contacts

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×3

eclipse ×2

android-2.2-froyo ×1

contacts ×1

listview ×1