這裏有什麼問題導致異常發生?我沒有在這裏找到任何問題。任何人都可以看看這個:根據您的堆棧跟蹤錯誤:無法讀取第0行,第-1列。 weired
private Cursor getAllPhoneNumbersForNamesLike(String str){
Cursor tempContact=null;
tempContact=this.getContentResolver().query(uriContact,null,"display_name like ?",new String[]{tokenLike+"%"},null);
if(tempContact!=null && tempContact.getCount()>0){
try{
tempContact.moveToFirst();
Toast.makeText(this,tempContact.getString(tempContact.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)), Toast.LENGTH_LONG).show();
}catch(Exception e){
Toast.makeText(this, "Inside getAllPhoneNumbersForNamesLike catch: "+e.toString(), Toast.LENGTH_LONG).show();
return null;
}
return this.getContentResolver().query(uriSmsRead,null,inClause,null,null);
}
else
return null;
}
private Uri uriContact = ContactsContract.Contacts.CONTENT_URI; – 2013-05-09 04:13:52
給我們提供錯誤和堆棧跟蹤。 – Patashu 2013-05-09 04:14:04
String tokenLike =「SJ」 – 2013-05-09 04:14:26