2012-09-06 55 views
1

在我的應用程序嘗試啓動瀏覽器具有以下網址:應用程序因「低內存:不再有後臺進程」而死亡。

https://maps.google.com/maps?saddr=indiranagar bangalore&daddr=mgroad bangalore 

瀏覽器啓動,並在地圖上加載我的應用程序獲取具有以下logcat的消息被殺:

I/ActivityManager( 61): Starting: Intent { act=android.intent.action.VIEW dat= 
http://View cmp=com.android.browser/.BrowserActivity (has extras) } from pid 355 

I/ActivityManager( 61): Starting: Intent { act=android.intent.action.VIEW dat= 
https://maps.google.com/maps?saddr=indiranagar bangalore&daddr=mgroad bangalore 
cmp=com.android.browser/.BrowserActivity } from pid 355 
D/PhoneWindow( 355): couldn't save which view has focus because the focused vie 
w [email protected] has no id. 
I/ActivityManager( 61): Displayed com.android.browser/.BrowserActivity: +760ms 

W/IInputConnectionWrapper( 355): showStatusIcon on inactive InputConnection 
I/dalvikvm( 373): Jit: resizing JitTable from 1024 to 2048 
I/System.out( 355): Logout Counter:30 
D/dalvikvm( 373): GC_CONCURRENT freed 369K, 50% free 3921K/7751K, external 2234 
K/2645K, paused 5ms+18ms 
D/dalvikvm( 355): GC_EXPLICIT freed 866K, 50% free 3666K/7239K, external 2693K/ 
3310K, paused 1640ms 
D/dalvikvm( 373): GC_CONCURRENT freed 1400K, 54% free 3641K/7751K, external 226 
6K/2645K, paused 6ms+26ms 
W/browser ( 373): We should not show context menu when nothing is touched 
W/browser ( 373): We should not show context menu when nothing is touched 
W/browser ( 373): We should not show context menu when nothing is touched 
**I/ActivityManager( 61): Process com.aavarp.mobile (pid 355) has died. 
I/ActivityManager( 61): Low Memory: No more background processes.** 
I/WindowManager( 61): WIN DEATH: Window{408793c0 com.aavarp.mobile/com.aavarp. 
mobile.core.ui.ApplicationsActivity paused=false} 
E/InputDispatcher( 61): channel '4070e4f8 com.aavarp.mobile/com.aavarp.mobile. 
dashboard.ui.components.GraphActivity (server)' ~ Consumer closed input channel 
or an error occurred. events=0x8 
E/InputDispatcher( 61): channel '4070e4f8 com.aavarp.mobile/com.aavarp.mobile. 
dashboard.ui.components.GraphActivity (server)' ~ Channel is unrecoverably broke 
n and will be disposed! 
I/WindowManager( 61): WIN DEATH: Window{4070e4f8 com.aavarp.mobile/com.aavarp. 
mobile.dashboard.ui.components.GraphActivity paused=false} 
I/WindowManager( 61): WIN DEATH: Window{406836a8 com.aavarp.mobile/com.aavarp. 
mobile.dashboard.ui.components.NotificationList paused=false} 
I/WindowManager( 61): WIN DEATH: Window{406825a8 com.aavarp.mobile/com.aavarp. 
mobile.dashboard.ui.components.TableListActivity paused=false} 
I/WindowManager( 61): WIN DEATH: Window{4083df30 com.aavarp.mobile/com.aavarp. 
mobile.dashboard.ui.components.DetailsActivity paused=false} 
E/InputDispatcher( 61): Received spurious receive callback for unknown input c 
hannel. fd=171, events=0x8 
E/InputDispatcher( 61): Received spurious receive callback for unknown input c 
hannel. fd=175, events=0x8 
E/InputDispatcher( 61): Received spurious receive callback for unknown input c 
hannel. fd=181, events=0x8 
D/dalvikvm( 61): GC_CONCURRENT freed 1735K, 52% free 4435K/9159K, external 529 
2K/6609K, paused 8ms+16ms 
D/skia ( 129): purging 38K from font cache [5 entries] 
D/dalvikvm( 129): GC_EXPLICIT freed 84K, 52% free 2801K/5767K, external 2117K/2 
643K, paused 73ms 

我再次嘗試通過www.google.com從我的應用程序啓動瀏覽器,並執行搜索並瀏覽各種頁面,然後導航回我的應用程序,沒有任何問題。我不確定是否在logcat上丟失了一些消息。我使用Android 2.3操作系統。請有人幫助我解決此問題。提前致謝。

+0

如何分享一些代碼作爲logcat的沒有指向任何明顯。 – Pankaj

回答

2

你爲什麼要在webview ..中加載地圖?您加載地圖在map activity

使用Intents List: Invoking Google Applications on Android Devices

String uri = "http://maps.google.com/maps?saddr=" + "9982878"+","+"76285774"+"&daddr="+"9992084"+","+"76286455"; 
     Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)); 
     intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"); 
     startActivity(intent); 

注:用於顯示route你應該使用地圖活性帆布

+0

我需要爲此添加Google地圖庫嗎? –

+1

對於地圖活動是的..右鍵單擊該項目將其更改爲谷歌API,並獲取[keystore](https://developers.google.com/maps/documentation/android/mapkey) –