我在8到17的几个SDK上测试了我的应用程序。我还测试了大多数屏幕尺寸。但是当我在5到6英寸的屏幕尺寸上运行它时,它会在SDK 16和17或API 4.1.2 / 4.2.2上崩溃。我不确定是什么原因。我会发布我的Log Cat和我的AndroidManifest.xml以获取更多信息。
06-20 04:00:03.367: E/Trace(666): error opening trace file: No such file or directory (2)
06-20 04:00:03.676: D/dalvikvm(666): GC_FOR_ALLOC freed 45K, 4% free 6043K/6275K, paused 55ms, total 57ms
06-20 04:00:03.726: I/dalvikvm-heap(666): Grow heap (frag case) to 9.413MB for 3634576-byte allocation
06-20 04:00:04.026: D/dalvikvm(666): GC_CONCURRENT freed 1K, 3% free 9591K/9863K, paused 124ms+50ms, total 301ms
06-20 04:00:05.426: D/gralloc_goldfish(666): Emulator without GPU emulation detected.
06-20 04:00:05.716: I/Choreographer(666): Skipped 54 frames! The application may be doing too much work on its main thread.
06-20 04:00:06.466: I/Choreographer(666): Skipped 60 frames! The application may be doing too much work on its main thread.
06-20 04:00:06.667: I/Choreographer(666): Skipped 39 frames! The application may be doing too much work on its main thread.
06-20 04:00:07.077: I/Choreographer(666): Skipped 65 frames! The application may be doing too much work on its main thread.
06-20 04:00:07.437: I/Choreographer(666): Skipped 72 frames! The application may be doing too much work on its main thread.
06-20 04:00:08.006: I/Choreographer(666): Skipped 44 frames! The application may be doing too much work on its main thread.
06-20 04:00:08.396: I/Choreographer(666): Skipped 54 frames! The application may be doing too much work on its main thread.
06-20 04:00:08.636: I/Choreographer(666): Skipped 46 frames! The application may be doing too much work on its main thread.
06-20 04:00:08.997: D/dalvikvm(666): GC_FOR_ALLOC freed 13K, 2% free 10007K/10119K, paused 65ms, total 67ms
06-20 04:00:09.056: I/dalvikvm-heap(666): Grow heap (frag case) to 12.839MB for 3168016-byte allocation
06-20 04:00:09.256: D/dalvikvm(666): GC_FOR_ALLOC freed 3K, 2% free 13097K/13255K, paused 61ms, total 61ms
06-20 04:00:09.407: I/Choreographer(666): Skipped 191 frames! The application may be doing too much work on its main thread.
06-20 04:00:10.096: I/dalvikvm-heap(666): Clamp target GC heap from 16.130MB to 16.000MB
06-20 04:00:10.106: D/dalvikvm(666): GC_FOR_ALLOC freed 178K, 3% free 14423K/14791K, paused 62ms, total 72ms
06-20 04:00:10.656: I/dalvikvm-heap(666): Clamp target GC heap from 17.175MB to 16.000MB
06-20 04:00:10.656: D/dalvikvm(666): GC_FOR_ALLOC freed 3K, 3% free 15492K/15943K, paused 111ms, total 113ms
06-20 04:00:10.666: I/dalvikvm-heap(666): Forcing collection of SoftReferences for 547616-byte allocation
06-20 04:00:10.856: I/dalvikvm-heap(666): Clamp target GC heap from 17.166MB to 16.000MB
06-20 04:00:10.886: D/dalvikvm(666): GC_BEFORE_OOM freed 9K, 3% free 15483K/15943K, paused 224ms, total 225ms
06-20 04:00:10.886: E/dalvikvm-heap(666): Out of memory on a 547616-byte allocation.
06-20 04:00:10.886: I/dalvikvm(666): "main" prio=5 tid=1 RUNNABLE
06-20 04:00:10.896: I/dalvikvm(666): | group="main" sCount=0 dsCount=0 obj=0x40a14568 self=0x2a00b9e0
06-20 04:00:10.896: I/dalvikvm(666): | sysTid=666 nice=0 sched=0/0 cgrp=apps handle=1073870640
06-20 04:00:10.896: I/dalvikvm(666): | schedstat=( 4211466008 3444268468 524 ) utm=358 stm=63 core=0
06-20 04:00:10.896: I/dalvikvm(666): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
06-20 04:00:10.896: I/dalvikvm(666): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
06-20 04:00:10.896: I/dalvikvm(666): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
06-20 04:00:10.906: I/dalvikvm(666): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
06-20 04:00:10.906: I/dalvikvm(666): at android.content.res.Resources.loadDrawable(Resources.java:1930)
06-20 04:00:10.906: I/dalvikvm(666): at android.content.res.Resources.getDrawable(Resources.java:659)
06-20 04:00:10.906: I/dalvikvm(666): at android.widget.ImageView.resolveUri(ImageView.java:611)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.ImageView.setImageResource(ImageView.java:354)
06-20 04:00:10.946: I/dalvikvm(666): at com.example.touch.ImageAdapter.getView(ImageAdapter.java:64)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.AbsListView.obtainView(AbsListView.java:2271)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.GridView.makeAndAddView(GridView.java:1331)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.GridView.makeRow(GridView.java:331)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.GridView.fillDown(GridView.java:283)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.GridView.fillFromTop(GridView.java:407)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.GridView.layoutChildren(GridView.java:1219)
06-20 04:00:10.946: I/dalvikvm(666): at android.widget.AbsListView.onLayout(AbsListView.java:2106)
06-20 04:00:10.946: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.946: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.956: I/dalvikvm(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:10.956: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.956: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.956: I/dalvikvm(666): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:10.956: I/dalvikvm(666): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:10.956: I/dalvikvm(666): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:10.956: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.956: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.966: I/dalvikvm(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.966: I/dalvikvm(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.966: I/dalvikvm(666): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:10.966: I/dalvikvm(666): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:10.966: I/dalvikvm(666): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.966: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.976: I/dalvikvm(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:10.976: I/dalvikvm(666): at android.view.View.layout(View.java:13754)
06-20 04:00:10.986: I/dalvikvm(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:10.986: I/dalvikvm(666): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1868)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1689)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.Choreographer.doFrame(Choreographer.java:525)
06-20 04:00:10.996: I/dalvikvm(666): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
06-20 04:00:10.996: I/dalvikvm(666): at android.os.Handler.handleCallback(Handler.java:615)
06-20 04:00:10.996: I/dalvikvm(666): at android.os.Handler.dispatchMessage(Handler.java:92)
06-20 04:00:10.996: I/dalvikvm(666): at android.os.Looper.loop(Looper.java:137)
06-20 04:00:11.038: I/dalvikvm(666): at android.app.ActivityThread.main(ActivityThread.java:4745)
06-20 04:00:11.038: I/dalvikvm(666): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 04:00:11.046: I/dalvikvm(666): at java.lang.reflect.Method.invoke(Method.java:511)
06-20 04:00:11.046: I/dalvikvm(666): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
06-20 04:00:11.046: I/dalvikvm(666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-20 04:00:11.046: I/dalvikvm(666): at dalvik.system.NativeStart.main(Native Method)
06-20 04:00:11.046: D/skia(666): --- decoder->decode returned false
06-20 04:00:11.046: D/AndroidRuntime(666): Shutting down VM
06-20 04:00:11.046: W/dalvikvm(666): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
06-20 04:00:11.166: E/AndroidRuntime(666): FATAL EXCEPTION: main
06-20 04:00:11.166: E/AndroidRuntime(666): java.lang.OutOfMemoryError
06-20 04:00:11.166: E/AndroidRuntime(666): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.content.res.Resources.loadDrawable(Resources.java:1930)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.content.res.Resources.getDrawable(Resources.java:659)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.ImageView.resolveUri(ImageView.java:611)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.ImageView.setImageResource(ImageView.java:354)
06-20 04:00:11.166: E/AndroidRuntime(666): at com.example.touch.ImageAdapter.getView(ImageAdapter.java:64)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.AbsListView.obtainView(AbsListView.java:2271)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.GridView.makeAndAddView(GridView.java:1331)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.GridView.makeRow(GridView.java:331)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.GridView.fillDown(GridView.java:283)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.GridView.fillFromTop(GridView.java:407)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.GridView.layoutChildren(GridView.java:1219)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.AbsListView.onLayout(AbsListView.java:2106)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.View.layout(View.java:13754)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1868)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1689)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.Choreographer.doFrame(Choreographer.java:525)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.os.Handler.handleCallback(Handler.java:615)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.os.Handler.dispatchMessage(Handler.java:92)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.os.Looper.loop(Looper.java:137)
06-20 04:00:11.166: E/AndroidRuntime(666): at android.app.ActivityThread.main(ActivityThread.java:4745)
06-20 04:00:11.166: E/AndroidRuntime(666): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 04:00:11.166: E/AndroidRuntime(666): at java.lang.reflect.Method.invoke(Method.java:511)
06-20 04:00:11.166: E/AndroidRuntime(666): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
06-20 04:00:11.166: E/AndroidRuntime(666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-20 04:00:11.166: E/AndroidRuntime(666): at dalvik.system.NativeStart.main(Native Method)
06-20 04:00:22.749: I/Process(666): Sending signal. PID: 666 SIG: 9
06-20 04:00:36.646: E/Trace(760): error opening trace file: No such file or directory (2)
06-20 04:00:37.246: D/dalvikvm(760): GC_FOR_ALLOC freed 58K, 4% free 6043K/6275K, paused 58ms, total 60ms
06-20 04:00:37.296: I/dalvikvm-heap(760): Grow heap (frag case) to 9.413MB for 3634576-byte allocation
06-20 04:00:37.417: D/dalvikvm(760): GC_CONCURRENT freed 1K, 3% free 9591K/9863K, paused 28ms+18ms, total 120ms
06-20 04:00:38.427: D/gralloc_goldfish(760): Emulator without GPU emulation detected.
06-20 04:00:38.739: I/Choreographer(760): Skipped 65 frames! The application may be doing too much work on its main thread.
06-20 04:00:39.906: I/Choreographer(760): Skipped 30 frames! The application may be doing too much work on its main thread.
06-20 04:00:40.536: I/Choreographer(760): Skipped 32 frames! The application may be doing too much work on its main thread.
06-20 04:00:41.336: I/Choreographer(760): Skipped 31 frames! The application may be doing too much work on its main thread.
06-20 04:00:41.576: I/Choreographer(760): Skipped 48 frames! The application may be doing too much work on its main thread.
06-20 04:00:41.856: D/dalvikvm(760): GC_FOR_ALLOC freed 12K, 2% free 10008K/10119K, paused 47ms, total 50ms
06-20 04:00:41.896: I/dalvikvm-heap(760): Grow heap (frag case) to 12.840MB for 3168016-byte allocation
06-20 04:00:42.086: D/dalvikvm(760): GC_CONCURRENT freed 3K, 2% free 13097K/13255K, paused 101ms+8ms, total 184ms
06-20 04:00:42.216: I/Choreographer(760): Skipped 158 frames! The application may be doing too much work on its main thread.
06-20 04:00:42.796: I/dalvikvm-heap(760): Clamp target GC heap from 16.131MB to 16.000MB
06-20 04:00:42.806: D/dalvikvm(760): GC_FOR_ALLOC freed 178K, 3% free 14423K/14791K, paused 48ms, total 57ms
06-20 04:00:43.026: I/dalvikvm-heap(760): Clamp target GC heap from 17.175MB to 16.000MB
06-20 04:00:43.026: D/dalvikvm(760): GC_FOR_ALLOC freed 3K, 3% free 15493K/15943K, paused 49ms, total 52ms
06-20 04:00:43.036: I/dalvikvm-heap(760): Forcing collection of SoftReferences for 547616-byte allocation
06-20 04:00:43.117: I/dalvikvm-heap(760): Clamp target GC heap from 17.167MB to 16.000MB
06-20 04:00:43.117: D/dalvikvm(760): GC_BEFORE_OOM freed 9K, 3% free 15483K/15943K, paused 80ms, total 82ms
06-20 04:00:43.117: E/dalvikvm-heap(760): Out of memory on a 547616-byte allocation.
06-20 04:00:43.126: I/dalvikvm(760): "main" prio=5 tid=1 RUNNABLE
06-20 04:00:43.126: I/dalvikvm(760): | group="main" sCount=0 dsCount=0 obj=0x40a14568 self=0x2a00b9e0
06-20 04:00:43.126: I/dalvikvm(760): | sysTid=760 nice=0 sched=0/0 cgrp=apps handle=1073870640
06-20 04:00:43.126: I/dalvikvm(760): | schedstat=( 4242267728 2354233437 533 ) utm=340 stm=84 core=0
06-20 04:00:43.126: I/dalvikvm(760): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
06-20 04:00:43.126: I/dalvikvm(760): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
06-20 04:00:43.126: I/dalvikvm(760): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
06-20 04:00:43.136: I/dalvikvm(760): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
06-20 04:00:43.136: I/dalvikvm(760): at android.content.res.Resources.loadDrawable(Resources.java:1930)
06-20 04:00:43.136: I/dalvikvm(760): at android.content.res.Resources.getDrawable(Resources.java:659)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.ImageView.resolveUri(ImageView.java:611)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.ImageView.setImageResource(ImageView.java:354)
06-20 04:00:43.136: I/dalvikvm(760): at com.example.touch.ImageAdapter.getView(ImageAdapter.java:64)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.AbsListView.obtainView(AbsListView.java:2271)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.GridView.makeAndAddView(GridView.java:1331)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.GridView.makeRow(GridView.java:331)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.GridView.fillDown(GridView.java:283)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.GridView.fillFromTop(GridView.java:407)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.GridView.layoutChildren(GridView.java:1219)
06-20 04:00:43.136: I/dalvikvm(760): at android.widget.AbsListView.onLayout(AbsListView.java:2106)
06-20 04:00:43.136: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.146: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.146: I/dalvikvm(760): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:43.146: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.146: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.146: I/dalvikvm(760): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:43.146: I/dalvikvm(760): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:43.146: I/dalvikvm(760): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:43.146: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.146: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.146: I/dalvikvm(760): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.156: I/dalvikvm(760): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.156: I/dalvikvm(760): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649)
06-20 04:00:43.156: I/dalvikvm(760): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507)
06-20 04:00:43.156: I/dalvikvm(760): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.156: I/dalvikvm(760): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.View.layout(View.java:13754)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.ViewGroup.layout(ViewGroup.java:4364)
06-20 04:00:43.156: I/dalvikvm(760): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1868)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1689)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.Choreographer.doFrame(Choreographer.java:525)
06-20 04:00:43.166: I/dalvikvm(760): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
06-20 04:00:43.166: I/dalvikvm(760): at android.os.Handler.handleCallback(Handler.java:615)
06-20 04:00:43.166: I/dalvikvm(760): at android.os.Handler.dispatchMessage(Handler.java:92)
06-20 04:00:43.176: I/dalvikvm(760): at android.os.Looper.loop(Looper.java:137)
06-20 04:00:43.176: I/dalvikvm(760): at android.app.ActivityThread.main(ActivityThread.java:4745)
06-20 04:00:43.176: I/dalvikvm(760): at java.lang.reflect.Method.invokeNative(Native Method)
06-20 04:00:43.176: I/dalvikvm(760): at java.lang.reflect.Method.invoke(Method.java:511)
06-20 04:00:43.176: I/dalvikvm(760): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
06-20 04:00:43.176: I/dalvikvm(760): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-20 04:00:43.176: I/dalvikvm(760): at dalvik.system.NativeStart.main(Native Method)
06-20 04:00:43.176: D/skia(760): --- decoder->decode returned false
06-20 04:00:43.176: D/AndroidRuntime(760): Shutting down VM
06-20 04:00:43.176: W/dalvikvm(760): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
06-20 04:00:43.246: E/AndroidRuntime(760): FATAL EXCEPTION: main
06-20 04:00:43.246: E/AndroidRuntime(760): java.lang.OutOfMemoryError
06-20 04:00:43.246: E/AndroidRuntime(760): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.content.res.Resources.loadDrawable(Resources.java:1930)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.content.res.Resources.getDrawable(Resources.java:659)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.widget.ImageView.resolveUri(ImageView.java:611)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.widget.ImageView.setImageResource(ImageView.java:354)
06-20 04:00:43.246: E/AndroidRuntime(760): at com.example.touch.ImageAdapter.getView(ImageAdapter.java:64)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.widget.AbsListView.obtainView(AbsListView.java:2271)
06-20 04:00:43.246: E/AndroidRuntime(760): at android.widget.GridView.makeAndAddView(GridView.java:1331)
以下是我的Android Manifest。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.touch"
android:versionCode="1"
android:versionName="1.0" >
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="600"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_PERMISSION" />
<uses-sdk
android:minSdkVersion="8"/>
<application
android:icon="@drawable/icon_menu"
android:label="@string/app_name" >
<activity
android:name=".TouchImageViewActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.TOUCHIMAGEVIEWACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".AndroidGridLayoutActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.ANDROIDGRIDLAYOUTACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Splash"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- FullImageActivity -->
<activity android:name=".FullImageActivity" >
<intent-filter>
<action android:name="android.intent.action.FULLIMAGEACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
行使用-sdk android:minSdkVersion =&#34; 8&#34;在清单中,我已经尝试删除该行并且还添加了最大目标值17,当我尝试执行时它仍然崩溃。
提前感谢您的帮助!