都在com.android.hellomiss.Service这些里面的问题,你这挂的,都不给定位在哪行空指针。

解决方案 »

  1.   


    12-22 14:16:39.355: ERROR/AndroidRuntime(768): FATAL EXCEPTION: main
    12-22 14:16:39.355: ERROR/AndroidRuntime(768): android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.database.AbstractCursor.checkPosition(AbstractCursor.java:580)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:214)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.database.AbstractWindowedCursor.getInt(AbstractWindowedCursor.java:84)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.database.CursorWrapper.getInt(CursorWrapper.java:123)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.hellomiss.Service.isAddOnePhoto(Service.java:258)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.hellomiss.Service.updatePhotoTable(Service.java:192)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.hellomiss.Service.access$300(Service.java:29)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.hellomiss.Service$5.onChange(Service.java:163)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:43)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.os.Handler.handleCallback(Handler.java:587)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.os.Handler.dispatchMessage(Handler.java:92)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.os.Looper.loop(Looper.java:123)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at android.app.ActivityThread.main(ActivityThread.java:4627)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at java.lang.reflect.Method.invokeNative(Native Method)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at java.lang.reflect.Method.invoke(Method.java:521)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
    12-22 14:16:39.355: ERROR/AndroidRuntime(768):     at dalvik.system.NativeStart.main(Native Method)
      

  2.   

    12-22 14:16:39.355: ERROR/AndroidRuntime(768): android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
    索引溢出了,增加记录数为0的时候,不执行操作。
      

  3.   

    bitmap的空指针?搞不懂~~~
      

  4.   

    一哭二闹三上吊
    例如你要对查询记录进行显示,但查询结果集为0,即没有数据,这时候就不能执行显示操作了。使用之前先判断为不为null同理,先判断再使用
      

  5.   

    噢 我也是先判断的~~还以为自己做的不对呢~~希望不再出现此类bug~~~~