V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
allblueee798
V2EX  ›  Flutter

Flutter 新手求助,关于 OOM 的疑问

  •  
  •   allblueee798 · 2023-04-19 08:49:34 +08:00 · 1401 次点击
    这是一个创建于 372 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,我是一个 flutter 新手,对于 android 原生开发了解很少。目前是在网上找一些开源的 flutter 代码边调试边学习。但是我发现在我调试的好几个项目中,都会报 oom 错误,但似乎并不影响开发环境的运行。 报错类似如下:

    E/AndroidRuntime(32129): FATAL EXCEPTION: pool-3-thread-188
    E/AndroidRuntime(32129): Process: com.miui.dmregservice, PID: 32129
    E/AndroidRuntime(32129): java.lang.OutOfMemoryError: Failed to allocate a 75497480 byte allocation with 25165824 free bytes and 71MB until OOM, target footprint 218331896, growth limit 268435456
    

    在网上搜索后(主要是 stackoverflow ),回答要么是修改 android 代码中内存方面的配置,要么是优化代码的写法(这部分有点难懂,作为初学者看起来很吃力)。既然不影响正常运行,我感觉好像问题不大?不知道路过的 flutter 开发者如何看这个问题呢?(希望大家不要觉得我的问题很白痴,我纯纯新手:)

    3 条回复    2023-04-19 09:27:39 +08:00
    zhcode
        1
    zhcode  
       2023-04-19 09:13:33 +08:00
    看日志像是 com.miui.dmregservice 这个 app 报的 oom ,不是你的项目
    allblueee798
        2
    allblueee798  
    OP
       2023-04-19 09:18:10 +08:00
    @zhcode 确实,仔细一看应该是我这个小米手机的问题?那更不知道怎么解决了 o.o
    RightHand
        3
    RightHand  
       2023-04-19 09:27:39 +08:00 via Android
    换个手机看看
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3321 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:30 · PVG 20:30 · LAX 05:30 · JFK 08:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.