你的androidManefest.xml写错了,导致无法在launcher界面显示icon错误的:
android.intent.action.Main
正确的:
android.intent.action.MAIN其他的,代码本身没有问题。

解决方案 »

  1.   

    上面那个图有点不清楚,看这个图吧http://hi.csdn.net/attachment/201004/21/2187412_1271832378n1ZR.png
      

  2.   

    int numberFieldColumnIndex = cursor.getColumnIndex(PhoneLookup.NUMBER);   这句出错了,数据库中,contacts这张表中,不存在numbers这一列.书上的例子大多跟不上时代了,建议你自己去
    android.git.kernel.org/  去下载source code去看吧如果你是初学者,就不要看书了,把sdk目录下的/doc/index.html打开
    按照:dev guide->referrence->resource这个顺序看一遍,比看10本书都管用
      

  3.   

    在while (cursor.moveToNext())之前最好先cursor.moveToFirst()一下。
    典型用法是这样:
       if (cursor.moveToFirst()) {
           do {
               ....
           while (cursor.moveToNext());
      

  4.   

    if (cursor!=null&&cousor.getCount()>0) {
      do {
      ....
      while (cursor.moveToNext());
      

  5.   

    一般书上的代码是不会错的 大多是程序员的环境配置方面的原因多些 建议LZ先试着写个helloworld 从简单的代码看起比较好些
      

  6.   

    我这边还是出问题了额
    我想请问一下哦,Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);
    这句报错,是为什么呀?