0
    i=Integer.parseInt(sendPostDataToInternet("ss"));
    int j=i-4;
    int h=0;
    while(i>j){
        String stringValue = Integer.toString(i);
    tt[h] = sendPostDataToInternet(stringValue);
    i--;
    h++;
    }
    ListView listView = (ListView) findViewById(R.id.mylist);
    ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(ShouterActivity.this,
    android.R.layout.simple_list_item_1, android.R.id.text1, tt);
    listView.setAdapter(adapter);

请参阅我没有为 onClickListener 设置任何内容,但在 LogCat 中导致错误。我可以在模拟器中显示列表,但是当我单击它或只是想滚动时,它会强制关闭。我认为我的循环没有任何问题,因为我得到了:

06-26 12:10:05.528: E/AndroidRuntime(461):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1691)
06-26 12:10:05.528: E/AndroidRuntime(461):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1125)
06-26 12:10:05.528: E/AndroidRuntime(461):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1675)
06-26 12:10:05.528: E/AndroidRuntime(461):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-26 12:10:05.528: E/AndroidRuntime(461):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)

我的程序没有

按要求编辑:

06-26 12:23:45.398: I/ActivityManager(61): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.pwrutls.sht/.ShouterActivity } from pid 487
06-26 12:23:45.468: I/ActivityManager(61): Start proc com.pwrutls.sht for activity com.pwrutls.sht/.ShouterActivity: pid=496 uid=10034 gids={3003}
06-26 12:23:51.368: I/ActivityManager(61): Displayed com.pwrutls.sht/.ShouterActivity: +5s910ms
06-26 12:24:04.808: E/AndroidRuntime(496):  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1691)
06-26 12:24:04.808: E/AndroidRuntime(496):  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1125)
06-26 12:24:04.808: E/AndroidRuntime(496):  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1675)
06-26 12:24:04.808: E/AndroidRuntime(496):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-26 12:24:04.808: E/AndroidRuntime(496):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-26 12:24:04.818: W/ActivityManager(61):   Force finishing activity com.pwrutls.sht/.ShouterActivity
06-26 12:24:05.338: W/ActivityManager(61): Activity pause timeout for HistoryRecord{40680538 com.pwrutls.sht/.ShouterActivity}
06-26 12:24:10.567: I/InputDispatcher(61): Application is not responding: Window{406b45d0 com.pwrutls.sht/com.pwrutls.sht.ShouterActivity paused=false}.  5000.4ms since event, 5000.2ms since wait started
06-26 12:24:10.567: I/WindowManager(61): Input event dispatching timed out sending to com.pwrutls.sht/com.pwrutls.sht.ShouterActivity
06-26 12:24:10.588: I/ActivityManager(61): Process com.pwrutls.sht (pid 496) has died.
06-26 12:24:10.588: I/WindowManager(61): WIN DEATH: Window{406b45d0 com.pwrutls.sht/com.pwrutls.sht.ShouterActivity paused=false}
06-26 12:24:16.037: W/ActivityManager(61): Activity destroy timeout for HistoryRecord{40680538 com.pwrutls.sht/.ShouterActivity}
4

0 回答 0