2012-05-15 2 views
-1

나는 메모리 부족으로 인한 오류가 발생하지만내 사람 이름 장치에

05-14 21:52:54.625: I/dalvikvm(3561): Wrote stack traces to '/data/anr/traces.txt' 
05-14 21:52:55.135: I/dalvikvm(3561): threadid=3: reacting to signal 3 
05-14 21:52:55.135: I/dalvikvm(3561): Wrote stack traces to '/data/anr/traces.txt' 
05-14 21:52:56.785: D/dalvikvm(3561): GC_FOR_ALLOC freed 10K, 3% free 9663K/9863K, paused 13ms 
05-14 21:52:56.785: I/dalvikvm-heap(3561): Grow heap (frag case) to 10.158MB for 633616-byte allocation 
05-14 21:52:56.820: D/dalvikvm(3561): GC_CONCURRENT freed 3K, 3% free 10278K/10503K, paused 1ms+1ms 
05-14 21:52:56.845: D/dalvikvm(3561): GC_FOR_ALLOC freed <1K, 3% free 10280K/10503K, paused 10ms 
05-14 21:52:56.850: I/dalvikvm-heap(3561): Grow heap (frag case) to 10.759MB for 633616-byte allocation 
05-14 21:52:56.885: D/dalvikvm(3561): GC_CONCURRENT freed <1K, 3% free 10898K/11143K, paused 2ms+2ms 
05-14 21:52:56.910: D/dalvikvm(3561): GC_FOR_ALLOC freed <1K, 3% free 10899K/11143K, paused 13ms 
05-14 21:52:56.910: I/dalvikvm-heap(3561): Grow heap (frag case) to 11.365MB for 633616-byte allocation 
05-14 21:52:56.935: D/dalvikvm(3561): GC_CONCURRENT freed <1K, 3% free 11518K/11783K, paused 1ms+1ms 
05-14 21:53:04.005: D/dalvikvm(3561): GC_FOR_ALLOC freed 13K, 2% free 11708K/11847K, paused 24ms 
05-14 21:53:04.055: D/dalvikvm(3561): GC_CONCURRENT freed 419K, 5% free 12089K/12679K, paused 1ms+2ms 
05-14 21:53:04.080: D/dalvikvm(3561): GC_FOR_ALLOC freed 0K, 5% free 12089K/12679K, paused 9ms 
05-14 21:53:04.080: I/dalvikvm-heap(3561): Grow heap (frag case) to 13.680MB for 1843216-byte allocation 
05-14 21:53:04.105: D/dalvikvm(3561): GC_CONCURRENT freed 0K, 5% free 13889K/14535K, paused 1ms+1ms 
05-14 21:53:04.150: D/dalvikvm(3561): GC_FOR_ALLOC freed 800K, 10% free 13891K/15367K, paused 9ms 
05-14 21:53:04.155: I/dalvikvm-heap(3561): Grow heap (frag case) to 15.440MB for 1843216-byte allocation 
05-14 21:53:04.175: D/dalvikvm(3561): GC_CONCURRENT freed <1K, 9% free 15691K/17223K, paused 1ms+2ms 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at dalvik.system.NativeStart.main(Native Method) 
05-14 21:53:05.370: E/AndroidRuntime(3561): Caused by: android.view.InflateException: Binary XML file line #158: Error inflating class <unknown> 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.createView(LayoutInflater.java:606) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.app.Activity.setContentView(Activity.java:1835) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at pilestudios.dirtyyou.singleplay.onCreate(singleplay.java:23) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.app.Activity.performCreate(Activity.java:4465) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  ... 11 more 
05-14 21:53:05.370: E/AndroidRuntime(3561): Caused by: java.lang.reflect.InvocationTargetException 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at java.lang.reflect.Constructor.constructNative(Native Method) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.view.LayoutInflater.createView(LayoutInflater.java:586) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  ... 26 more 
05-14 21:53:05.370: E/AndroidRuntime(3561): Caused by: java.lang.OutOfMemoryError 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.Bitmap.nativeCreate(Native Method) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.Bitmap.createBitmap(Bitmap.java:605) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.Bitmap.createBitmap(Bitmap.java:551) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:524) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:499) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.content.res.Resources.loadDrawable(Resources.java:1966) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.widget.ImageView.<init>(ImageView.java:119) 
05-14 21:53:05.370: E/AndroidRuntime(3561):  at android.widget.ImageView.<init>(ImageView.java:109) 

답변

2

다른 장치가 서로 다른 힙이 잘 작동하는 것 같다 크기.

이미지 크기를 축소하여 도움이되는지 확인할 수 있습니다.

+0

내 장치 힙 크기를 늘릴 수있는 방법은 – GridSurfer

+0

힙 크기는 제조업체에서 설정하지만 Android 엣지 레이터에서 힙 크기를 변경할 수 있습니다. – Michaeldcooney

+0

비트 맵을 직접로드하고 ImageView 외부에 참조를 저장하면 메모리가 누출 될 수도 있습니다. 오 릴리 (O'Reily) 서적에 자세히 나와 있습니다. 자세한 내용은 [Android 프로그래밍] (http://ofps.oreilly.com/titles/9781449389697/)을 확인하십시오. – dcow

관련 문제