1

Androidアプリを作ろうとしています。リストからアイテムを選択すると、別のアクティビティに移動しますが、アイテムを押すと、このエラー (以下) が発生し、アプリケーションが終了します。わかりません。数時間前に機能しました。リスト項目をクリックすると開始されるアクティビティの .xml のテキスト ボックスの余白を変更しただけです。

11-25 21:06:21.427: D/dalvikvm(725): GC_FOR_ALLOC freed 33K, 3% free 6779K/6919K, paused 45ms, total 65ms
11-25 21:06:21.427: I/dalvikvm-heap(725): Forcing collection of SoftReferences for 11715856-byte allocation
11-25 21:06:21.547: D/dalvikvm(725): GC_BEFORE_OOM freed 603K, 11% free 6175K/6919K, paused 114ms, total 119ms
11-25 21:06:21.547: E/dalvikvm-heap(725): Out of memory on a 11715856-byte allocation.
11-25 21:06:21.547: I/dalvikvm(725): "main" prio=5 tid=1 RUNNABLE
11-25 21:06:21.547: I/dalvikvm(725):   | group="main" sCount=0 dsCount=0 obj=0x40a14568 self=0x2a00b9e0
11-25 21:06:21.547: I/dalvikvm(725):   | sysTid=725 nice=0 sched=0/0 cgrp=apps handle=1073870640
11-25 21:06:21.557: I/dalvikvm(725):   | schedstat=( 1339266348 1125088991 664 ) utm=96 stm=37 core=0
11-25 21:06:21.557: I/dalvikvm(725):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
11-25 21:06:21.566: I/dalvikvm(725):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
11-25 21:06:21.566: I/dalvikvm(725):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
11-25 21:06:21.566: I/dalvikvm(725):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
11-25 21:06:21.566: I/dalvikvm(725):   at android.content.res.Resources.loadDrawable(Resources.java:1930)
11-25 21:06:21.566: I/dalvikvm(725):   at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
11-25 21:06:21.566: I/dalvikvm(725):   at android.view.View.<init>(View.java:3336)
11-25 21:06:21.566: I/dalvikvm(725):   at android.view.ViewGroup.<init>(ViewGroup.java:427)
11-25 21:06:21.566: I/dalvikvm(725):   at android.widget.LinearLayout.<init>(LinearLayout.java:176)
11-25 21:06:21.566: I/dalvikvm(725):   at android.widget.LinearLayout.<init>(LinearLayout.java:172)
11-25 21:06:21.576: I/dalvikvm(725):   at java.lang.reflect.Constructor.constructNative(Native Method)
11-25 21:06:21.576: I/dalvikvm(725):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.createView(LayoutInflater.java:587)
11-25 21:06:21.587: I/dalvikvm(725):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-25 21:06:21.587: I/dalvikvm(725):   at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-25 21:06:21.587: I/dalvikvm(725):   at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
11-25 21:06:21.587: I/dalvikvm(725):   at android.app.Activity.setContentView(Activity.java:1867)
11-25 21:06:21.587: I/dalvikvm(725):   at com.example.lapp.legi.onCreate(legi.java:19)
11-25 21:06:21.587: I/dalvikvm(725):   at android.app.Activity.performCreate(Activity.java:5008)
11-25 21:06:21.587: I/dalvikvm(725):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
11-25 21:06:21.596: I/dalvikvm(725):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
11-25 21:06:21.596: I/dalvikvm(725):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-25 21:06:21.596: I/dalvikvm(725):   at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-25 21:06:21.596: I/dalvikvm(725):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-25 21:06:21.596: I/dalvikvm(725):   at android.os.Handler.dispatchMessage(Handler.java:99)
11-25 21:06:21.596: I/dalvikvm(725):   at android.os.Looper.loop(Looper.java:137)
11-25 21:06:21.596: I/dalvikvm(725):   at android.app.ActivityThread.main(ActivityThread.java:4745)
11-25 21:06:21.596: I/dalvikvm(725):   at java.lang.reflect.Method.invokeNative(Native Method)
11-25 21:06:21.596: I/dalvikvm(725):   at java.lang.reflect.Method.invoke(Method.java:511)
11-25 21:06:21.616: I/dalvikvm(725):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-25 21:06:21.616: I/dalvikvm(725):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-25 21:06:21.616: I/dalvikvm(725):   at dalvik.system.NativeStart.main(Native Method)
11-25 21:06:21.626: D/skia(725): --- decoder->decode returned false
11-25 21:06:21.626: D/AndroidRuntime(725): Shutting down VM
11-25 21:06:21.626: W/dalvikvm(725): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
11-25 21:06:21.686: E/AndroidRuntime(725): FATAL EXCEPTION: main
11-25 21:06:21.686: E/AndroidRuntime(725): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lapp/com.example.lapp.legi}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.os.Looper.loop(Looper.java:137)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread.main(ActivityThread.java:4745)
11-25 21:06:21.686: E/AndroidRuntime(725):  at java.lang.reflect.Method.invokeNative(Native Method)
11-25 21:06:21.686: E/AndroidRuntime(725):  at java.lang.reflect.Method.invoke(Method.java:511)
11-25 21:06:21.686: E/AndroidRuntime(725):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
11-25 21:06:21.686: E/AndroidRuntime(725):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-25 21:06:21.686: E/AndroidRuntime(725):  at dalvik.system.NativeStart.main(Native Method)
11-25 21:06:21.686: E/AndroidRuntime(725): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.createView(LayoutInflater.java:613)
11-25 21:06:21.686: E/AndroidRuntime(725):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-25 21:06:21.686: E/AndroidRuntime(725):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.Activity.setContentView(Activity.java:1867)
11-25 21:06:21.686: E/AndroidRuntime(725):  at com.example.lapp.legi.onCreate(legi.java:19)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.Activity.performCreate(Activity.java:5008)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
11-25 21:06:21.686: E/AndroidRuntime(725):  ... 11 more
11-25 21:06:21.686: E/AndroidRuntime(725): Caused by: java.lang.reflect.InvocationTargetException
11-25 21:06:21.686: E/AndroidRuntime(725):  at java.lang.reflect.Constructor.constructNative(Native Method)
11-25 21:06:21.686: E/AndroidRuntime(725):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.LayoutInflater.createView(LayoutInflater.java:587)
11-25 21:06:21.686: E/AndroidRuntime(725):  ... 23 more
11-25 21:06:21.686: E/AndroidRuntime(725): Caused by: java.lang.OutOfMemoryError
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.content.res.Resources.loadDrawable(Resources.java:1930)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.View.<init>(View.java:3336)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.view.ViewGroup.<init>(ViewGroup.java:427)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.widget.LinearLayout.<init>(LinearLayout.java:176)
11-25 21:06:21.686: E/AndroidRuntime(725):  at android.widget.LinearLayout.<init>(LinearLayout.java:172)
11-25 21:06:21.686: E/AndroidRuntime(725):  ... 26 more
11-25 21:06:24.386: E/Trace(742): error opening trace file: No such file or directory (2)
11-25 21:06:24.746: D/libEGL(742): loaded /system/lib/egl/libEGL_emulation.so
11-25 21:06:24.826: D/(742): HostConnection::get() New Host Connection established 0x2a0db078, tid 742
11-25 21:06:25.101: D/libEGL(742): loaded /system/lib/egl/libGLESv1_CM_emulation.so
11-25 21:06:25.116: D/libEGL(742): loaded /system/lib/egl/libGLESv2_emulation.so
11-25 21:06:25.895: W/EGL_emulation(742): eglSurfaceAttrib not implemented
11-25 21:06:26.436: D/OpenGLRenderer(742): Enabling debug mode 0
4

1 に答える 1

0

スタック トレースにあるように、メモリ不足エラーです。2行目から始まるXML要素で宣言しているビットマップのためです。

于 2012-11-25T21:33:17.480 に答える