gpt4 book ai didi

android - 我在 Android 中得到 "OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available"

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:29:42 28 4
gpt4 key购买 nike

直到昨天,我的应用程序运行良好,但我所做的是,由于某些原因,我不得不在 Android Studio 中打开具有不同工作空间的同一个应用程序。从那时起,当我尝试运行该应用程序时,我遇到了以下异常,所以我删除了新创建的工作节奏,但我仍然遇到以下异常。

 Throwing   OutOfMemoryError "Failed to allocate a 170 byte allocation with 74 free bytes and 74B until OOM" (recursive case)
"main" prio=5 tid=1 Runnable
| group="main" sCount=0 dsCount=0 obj=0x74430970 self=0xb4606800
| sysTid=1905 nice=0 cgrp=apps sched=0/0 handle=0xb777c160
| state=R schedstat=( 0 0 0 ) utm=83 stm=36 core=0 HZ=100
| stack=0xbf15b000-0xbf15d000 stackSize=8MB
| held mutexes= "mutator lock"(shared held)
at java.lang.String.<init>(String.java:233)
at java.lang.String.<init>(String.java:191)
at java.io.ByteArrayOutputStream.toString(ByteArrayOutputStream.java:175)
at java.util.jar.ManifestReader.readValue(ManifestReader.java:181)
at java.util.jar.ManifestReader.readHeader(ManifestReader.java:107)
at java.util.jar.ManifestReader.readEntries(ManifestReader.java:59)
at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:311)
at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:268)
at java.util.jar.JarFile.getInputStream(JarFile.java:380)
at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:222)
at java.net.URL.openStream(URL.java:470)
at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:444)
at java.lang.Class.getResourceAsStream(Class.java:1334)
at com.google.m.a.a.a.a(unavailable:-1)
at com.google.m.a.a.a.a(unavailable:-1)
at com.google.maps.api.android.lib6.b.e.<init>(unavailable:-1)
at com.google.maps.api.android.lib6.b.e.<init>(unavailable:-1)
at com.google.maps.api.android.lib6.b.e.a(unavailable:-1)
at com.google.maps.api.android.lib6.c.dz.a(unavailable:-1)

[ 03-30 11:13:03.162 1905: 1914 I/art ]
Clamp target GC heap from 64MB to 64MB

--------- beginning of crash
03-30 11:13:03.179 1905-1905/com.example.myothermap E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.myothermap, PID: 1905
java.lang.OutOfMemoryError: OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available

我该如何恢复?

最佳答案

将此行添加到您项目的 Manifest 文件中的 Application 标记内。

android:largeHeap="true"

像这样

<application
android:largeHeap="true"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >

关于android - 我在 Android 中得到 "OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29339302/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com