English 中文(简体)
I m 获取“OutOfMemoryError在试图扔 throwOfMemoryError时被抛弃;在安乐文中无一 st可用”。
原标题:I m getting "OutOfMemoryError thrown while trying to throw OutOfMemoryError; no stack available" in Android
  • 时间:2015-03-30 05:59:32
  •  标签:
  • android

直到昨天,我的申请书才奏效,但由于某些原因,我不得不在安乐施室开辟不同工作空间的同一申请。 从那时起,我试图以例外的方式来管理App Im,因此,我取消了新创建的工程步伐,但我仍然 st着以下例外。

 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档案中添加这一条。

android:largeHeap="true"

like this

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

Try adding this to your build gradle:

在安伯茨堡加入这一法典

dexOptions {
    javaMaxHeapSize "4g"
}




相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签