我不知道爲什麼,但如果我使子字符串應用程序崩潰!子字符串崩潰
下面的代碼:
while(data_mio.moveToNext())
{
titolo_da_inserire=data_mio.getString(prodotto);
titolo_da_inserire=titolo_da_inserire.substring(0,35)+"...";
personList.add(new Prodotto_per_lista(
R.drawable.freccia_1, titolo_da_inserire,
Integer.parseInt(data_mio.getString(id_immagine)))
);
}
你確保你的字符串titolo_da_inserire的最小長度爲35個字符? –
不知道......這也許是問題所在?在PHP這不是一個問題,但在這裏它可能是..讓我檢查 – Zak
崩潰後發佈stacktrace –