android - 应用程序死于 "Low Memory: No more background processes."

标签 android

在我的应用程序中,我尝试使用以下 url 启动浏览器:

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 android.widget.EditText@40587640 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 操作系统。请有人帮我解决这个问题。提前致谢。

最佳答案

为什么要在 webview 中加载 map ..?你在 map activity 中加载 map 或

使用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你应该使用 map Activity Canvas

关于android - 应用程序死于 "Low Memory: No more background processes.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12295398/

相关文章:

java - 蓝牙启用窗口打开

android - 流式传输音频时 MediaPlayer 缓冲时间问题

java - 显示导入包的名称,但被划掉

java - recyclerView中的setAdapter无法应用

android - 从 autocompletetextview 中的 onitemselect 中获取值

java - 适合视口(viewport)黑条

Android WiFiManager enableNetwork 返回 false

android - Chromecast 无法播放 Shoutcast Stream

android - 日志条目 "onDestroy leaving the lights on for com.myapp"是什么意思?

android - 检索自定义日期和时间的优雅解决方案?