V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
allblueee798
V2EX  ›  Flutter

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

  •  
  •   allblueee798 · Apr 19, 2023 · 2348 views
    This topic created in 1108 days ago, the information mentioned may be changed or developed.

    如题,我是一个 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 replies    2023-04-19 09:27:39 +08:00
    zhcode
        1
    zhcode  
       Apr 19, 2023
    看日志像是 com.miui.dmregservice 这个 app 报的 oom ,不是你的项目
    allblueee798
        2
    allblueee798  
    OP
       Apr 19, 2023
    @zhcode 确实,仔细一看应该是我这个小米手机的问题?那更不知道怎么解决了 o.o
    RightHand
        3
    RightHand  
       Apr 19, 2023 via Android
    换个手机看看
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2702 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 13:54 · PVG 21:54 · LAX 06:54 · JFK 09:54
    ♥ Do have faith in what you're doing.