我有一個應用程序在WebView中加載網頁。一旦我打開我的應用程序,如果我在任何時候點擊後退按鈕,它都會導致強制關閉。有沒有人遇到過這個?我不確定我真正想要什麼。我想禁用後退按鈕,因爲我的應用內置了「後退」功能。但保留默認的「返回上一頁」功能也可以。Android應用程序後退按鈕導致「強制關閉」
11-29 18:54:53.393: DEBUG/MediaScannerService(254): done scanning volume external
11-29 18:54:54.403: INFO/InputReader(62): Device reconfigured: id=0x0, name=qwerty, display size is now 320x480
11-29 18:54:54.403: WARN/InputReader(62): Touch device did not report support for X or Y axis!
11-29 18:54:59.453: INFO/ARMAssembler(62): generated scanline__00000077:03515104_00001004_00000000 [ 65 ipp] (85 ins) at [0x439e0520:0x439e0674] in 5501712 ns
11-29 18:54:59.493: INFO/ARMAssembler(62): generated scanline__00000177:03515104_00001001_00000000 [ 91 ipp] (114 ins) at [0x439e0678:0x439e0840] in 1081228 ns
11-29 18:54:59.653: INFO/ARMAssembler(62): generated scanline__00000177:03515104_00001002_00000000 [ 87 ipp] (110 ins) at [0x439e0848:0x439e0a00] in 610063 ns
11-29 18:55:03.283: WARN/KeyCharacterMap(286): No keyboard for id 0
11-29 18:55:03.283: WARN/KeyCharacterMap(286): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
我每次單擊後退了logcat的給了我這樣的:
11-29 18:55:17.303: INFO/InputDispatcher(62): Application is not responding: AppWindowToken{406f1558 token=HistoryRecord{406e7948 com.mysite/.MySite}} - Window{406d90f0 com.mysite/com.mysite.MySite paused=false}. 5026.2ms since event, 5023.1ms since wait started
11-29 18:55:17.303: INFO/WindowManager(62): Input event dispatching timed out sending to com.mysite/com.mysite.MySite
注意,與模擬器的應用程序不會崩潰像它在我的平板電腦。
請張貼logcat的堆棧跟蹤,它會顯示異常 – Craigy
請張貼日誌錯誤,在logcat的。啊,我知道我並不是唯一一個要求這樣做的人...... – davidcesarino
正如其他人所說的,請從Logcat發佈您的錯誤。另外,請注意 - 人們期望後退按鈕返回 - 如果停止工作,有些人會認爲應用程序中存在錯誤。而不是禁用後退按鈕,爲什麼不給它與內置後退按鈕相同的功能? –