从2.1版到4.0.4版本运行良好的Android应用程序,并在Jellybean上出错

时间:2013-03-30 09:57:05

标签: android android-emulator

我正在使用Simple Listview并设置res / drawable中的图像 而目标是api 16 从Android版本2.1到4.0.4一切正常,并在Nexus 7(4.2)和Galaxy s3(4.1.2)上出错 我想知道原因。 怎么可能?

的AndroidManifest.xml

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

project.properties

target=android-16

我尝试在手机Galaxy s2(4.0.4)上进行调试

它运行良好,模拟器版本4.2给出错误。

完整logcat

03-30 16:14:24.542: D/dalvikvm(1487): GC_CONCURRENT freed <1K, 31% free 29601K/42887K, paused 20ms+36ms, total 105ms 03-30 16:14:25.403: D/dalvikvm(1487): GC_FOR_ALLOC freed 0K, 31% free 29601K/42887K, paused 94ms, total 94ms 03-30 16:14:25.403: I/dalvikvm-heap(1487): Grow heap (frag case) to 37.939MB for 9437196-byte allocation 03-30 16:14:25.523: D/dalvikvm(1487): GC_CONCURRENT freed 0K, 10% free 38817K/42887K, paused 24ms+46ms, total 113ms 03-30 16:14:27.202: D/dalvikvm(1487): GC_FOR_ALLOC freed 4096K, 20% free 34721K/42887K, paused 60ms, total 62ms 03-30 16:14:27.202: I/dalvikvm-heap(1487): Grow heap (frag case) to 37.939MB for 4194316-byte allocation 03-30 16:14:27.362: D/dalvikvm(1487): GC_CONCURRENT freed <1K, 10% free 38817K/42887K, paused 17ms+0ms, total 156ms 03-30 16:14:28.172: D/dalvikvm(1487): GC_FOR_ALLOC freed 0K, 10% free 38817K/42887K, paused 58ms, total 58ms 03-30 16:14:28.183: I/dalvikvm-heap(1487): Forcing collection of SoftReferences for 9437196-byte allocation 03-30 16:14:28.272: D/dalvikvm(1487): GC_BEFORE_OOM freed 9K, 10% free 38808K/42887K, paused 93ms, total 93ms 03-30 16:14:28.272: E/dalvikvm-heap(1487): Out of memory on a 9437196-byte allocation. 03-30 16:14:28.272: I/dalvikvm(1487): "main" prio=5 tid=1 RUNNABLE 03-30 16:14:28.272: I/dalvikvm(1487): | group="main" sCount=0 dsCount=0 obj=0xb3e7e4b0 self=0xb84ad4e0 03-30 16:14:28.272: I/dalvikvm(1487): | sysTid=1487 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1208388544 03-30 16:14:28.292: I/dalvikvm(1487): | schedstat=( 0 0 0 ) utm=538 stm=32 core=0 03-30 16:14:28.292: I/dalvikvm(1487): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 03-30 16:14:28.292: I/dalvikvm(1487): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500) 03-30 16:14:28.292: I/dalvikvm(1487): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353) 03-30 16:14:28.292: I/dalvikvm(1487): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781) 03-30 16:14:28.292: I/dalvikvm(1487): at android.content.res.Resources.loadDrawable(Resources.java:1930) 03-30 16:14:28.292: I/dalvikvm(1487): at android.content.res.Resources.getDrawable(Resources.java:659) 03-30 16:14:28.292: I/dalvikvm(1487): at android.widget.ImageView.resolveUri(ImageView.java:611) 03-30 16:14:28.292: I/dalvikvm(1487): at android.widget.ImageView.setImageResource(ImageView.java:354) 03-30 16:14:28.292: I/dalvikvm(1487): at com.vladimir.pinterestlistview.adapters.ItemsAdapter.setImageBitmap(ItemsAdapter.java:71) 03-30 16:14:28.292: I/dalvikvm(1487): at com.vladimir.pinterestlistview.adapters.ItemsAdapter.getView(ItemsAdapter.java:53) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.AbsListView.obtainView(AbsListView.java:2267) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.ListView.makeAndAddView(ListView.java:1769) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.ListView.fillDown(ListView.java:672) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.ListView.fillFromTop(ListView.java:733) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.ListView.layoutChildren(ListView.java:1622) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.AbsListView.onLayout(AbsListView.java:2102) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.View.layout(View.java:13754) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewGroup.layout(ViewGroup.java:4362) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1638) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.onLayout(LinearLayout.java:1422) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.View.layout(View.java:13754) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewGroup.layout(ViewGroup.java:4362) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.View.layout(View.java:13754) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewGroup.layout(ViewGroup.java:4362) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1649) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1507) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.LinearLayout.onLayout(LinearLayout.java:1420) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.View.layout(View.java:13754) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewGroup.layout(ViewGroup.java:4362) 03-30 16:14:28.303: I/dalvikvm(1487): at android.widget.FrameLayout.onLayout(FrameLayout.java:448) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.View.layout(View.java:13754) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewGroup.layout(ViewGroup.java:4362) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1866) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1687) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4212) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.Choreographer.doCallbacks(Choreographer.java:555) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.Choreographer.doFrame(Choreographer.java:525) 03-30 16:14:28.303: I/dalvikvm(1487): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711) 03-30 16:14:28.303: I/dalvikvm(1487): at android.os.Handler.handleCallback(Handler.java:615) 03-30 16:14:28.303: I/dalvikvm(1487): at android.os.Handler.dispatchMessage(Handler.java:92) 03-30 16:14:28.303: I/dalvikvm(1487): at android.os.Looper.loop(Looper.java:137) 03-30 16:14:28.303: I/dalvikvm(1487): at android.app.ActivityThread.main(ActivityThread.java:4745) 03-30 16:14:28.303: I/dalvikvm(1487): at java.lang.reflect.Method.invokeNative(Native Method) 03-30 16:14:28.303: I/dalvikvm(1487): at java.lang.reflect.Method.invoke(Method.java:511) 03-30 16:14:28.303: I/dalvikvm(1487): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 03-30 16:14:28.303: I/dalvikvm(1487): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 03-30 16:14:28.303: I/dalvikvm(1487): at dalvik.system.NativeStart.main(Native Method) 03-30 16:14:28.303: A/libc(1487): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 1487 (com.galaxy.s4)

0 个答案:

没有答案