问题描述
初试android, 想问下...stoped unexpectedly这种意外终止的情况是什么原因,console里也没日志输出public class MainActivity extends ListActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 过时的People类用注释中的代替后仍然无法运行。。ContactsContract.Contacts.CONTENT_URI Cursor cursor = getContentResolver().query(People.CONTENT_URI, null, null, null, null); startManagingCursor(cursor); SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cursor, new String[]{People.NUMBER}, //PhoneLookup.NUMBER new int[] {android.R.id.text1}); setListAdapter(adapter); }} 问题补充:<div class="quote_title">dongya1987 写道</div><div class="quote_div">android的log不在console里,<br />Window->Open Perspective ->DDMS<br />在logcat里看</div><br />原来如此, 3ks<img src="/images/smiles/icon_smile.gif"/>
解决方案
android的log不在console里,Window->Open Perspective ->DDMS在logcat里看