看板 AndroidDev 關於我們 聯絡資訊
按照android初學特訓班書上範例 做一個自訂版面的ListView 不過一執行就當機 實在不知道出錯在哪 有高手能幫忙看一下嗎? 檔案連結如下 https://www.dropbox.com/s/dsgkbddjjvcp1cg/ListView_Test1_0907.rar?dl=0 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.79.35.59 ※ 文章網址: http://www.ptt.cc/bbs/AndroidDev/M.1410080760.A.658.html
ccc585: 未看先猜null point exception 09/07 22:02
laiair: 因為 MyAdapter 的 getView 是 return null 09/07 23:43
laiair: 應該是 return convertView 才對 09/07 23:44
wu110011: 謝謝,請問怎麼發現的呢? 09/08 09:48
laiair: log 報 null point, onCreate 只有設定listView 09/08 11:47
laiair: 所以就檢查 MyAdapter 哪邊有錯 09/08 11:47