Android Question [Solved] Set largeHeap in manifest only to Android <= 19

Discussion in 'Android Questions' started by asales, May 14, 2019.

  1. asales

    asales Well-Known Member Licensed User

    I see in the Firebase Crashlytics the "Fatal Exception: java.lang.OutOfMemoryError" in Android 4.2, 4.3 and 4.4.4.

    This line in manifest can be solve this problem?
    SetApplicationAttribute(android:largeHeap, "true")
    If yes, is possible to set this line in manifest only to Android <= 19 (4.4)? How?

    Thanks in advance for any tip.
  2. kisoft

    kisoft Active Member Licensed User

    this line allocates more memory on the system stack, which is always quite beneficial.
  3. Erel

    Erel Administrator Staff Member Licensed User

    It is not possible to add based on the version.
    asales likes this.
  4. asales

    asales Well-Known Member Licensed User

    If I put this line in the manifest, it will increase the memory only if necessary (to avoid the out of memory error in Android 4.2..4.4) and not will affect the app in Android > 19?
  5. Jorge M A

    Jorge M A Active Member Licensed User

    asales likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice