Lamentablemente la aplicación se ha detenido

Estoy recibiendo mensaje de error en mi AVD para mi primera aplicación para Android llamada "Mi creatividad". Su presentación:

Desafortunadamente mi creatividad ha parado

Tiene un simple cuadro de texto y un botón con fondo. Estoy tomando la ayuda de google.developers pero sobre el problema. ¿Cómo resolver esto?

Aquí está mi LogCat:

02-24 10:18:48.624: I/Process(1068): Sending signal. PID: 1068 SIG: 9 02-24 10:18:51.654: W/Trace(1088): Unexpected value from nativeGetEnabledTags: 0 02-24 10:18:51.654: W/Trace(1088): Unexpected value from nativeGetEnabledTags: 0 02-24 10:18:52.194: D/dalvikvm(1088): GC_FOR_ALLOC freed 77K, 8% free 2513K/2708K, paused 52ms, total 56ms 02-24 10:18:52.534: I/dalvikvm-heap(1088): Grow heap (frag case) to 21.787MB for 20155408-byte allocation 02-24 10:18:52.674: D/dalvikvm(1088): GC_FOR_ALLOC freed 1K, 1% free 22194K/22392K, paused 137ms, total 137ms 02-24 10:18:52.784: D/dalvikvm(1088): GC_CONCURRENT freed <1K, 1% free 22194K/22392K, paused 9ms+21ms, total 109ms 02-24 10:18:55.204: D/dalvikvm(1088): GC_FOR_ALLOC freed <1K, 1% free 22194K/22392K, paused 41ms, total 41ms 02-24 10:18:55.204: I/dalvikvm-heap(1088): Forcing collection of SoftReferences for 45349648-byte allocation 02-24 10:18:55.284: D/dalvikvm(1088): GC_BEFORE_OOM freed 9K, 1% free 22184K/22392K, paused 72ms, total 73ms 02-24 10:18:55.284: E/dalvikvm-heap(1088): Out of memory on a 45349648-byte allocation. 02-24 10:18:55.284: I/dalvikvm(1088): "main" prio=5 tid=1 RUNNABLE 02-24 10:18:55.284: I/dalvikvm(1088): | group="main" sCount=0 dsCount=0 obj=0x40a719a0 self=0x2a00bba8 02-24 10:18:55.284: I/dalvikvm(1088): | sysTid=1088 nice=0 sched=0/0 cgrp=apps handle=1073849308 02-24 10:18:55.284: I/dalvikvm(1088): | state=R schedstat=( 3224239902 1154906764 146 ) utm=280 stm=42 core=0 02-24 10:18:55.284: I/dalvikvm(1088): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 02-24 10:18:55.294: I/dalvikvm(1088): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502) 02-24 10:18:55.294: I/dalvikvm(1088): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355) 02-24 10:18:55.294: I/dalvikvm(1088): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785) 02-24 10:18:55.294: I/dalvikvm(1088): at android.content.res.Resources.loadDrawable(Resources.java:1965) 02-24 10:18:55.304: I/dalvikvm(1088): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 02-24 10:18:55.304: I/dalvikvm(1088): at android.view.View.<init>(View.java:3328) 02-24 10:18:55.304: I/dalvikvm(1088): at android.view.ViewGroup.<init>(ViewGroup.java:431) 02-24 10:18:55.304: I/dalvikvm(1088): at android.widget.LinearLayout.<init>(LinearLayout.java:176) 02-24 10:18:55.304: I/dalvikvm(1088): at android.widget.LinearLayout.<init>(LinearLayout.java:172) 02-24 10:18:55.316: I/dalvikvm(1088): at java.lang.reflect.Constructor.constructNative(Native Method) 02-24 10:18:55.316: I/dalvikvm(1088): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 02-24 10:18:55.316: I/dalvikvm(1088): at android.view.LayoutInflater.createView(LayoutInflater.java:587) 02-24 10:18:55.316: I/dalvikvm(1088): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 02-24 10:18:55.316: I/dalvikvm(1088): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) 02-24 10:18:55.316: I/dalvikvm(1088): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 02-24 10:18:55.316: I/dalvikvm(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-24 10:18:55.324: I/dalvikvm(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-24 10:18:55.324: I/dalvikvm(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-24 10:18:55.324: I/dalvikvm(1088): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270) 02-24 10:18:55.324: I/dalvikvm(1088): at android.app.Activity.setContentView(Activity.java:1881) 02-24 10:18:55.334: I/dalvikvm(1088): at com.example.iamgreat.GreatPiyu.onCreate(GreatPiyu.java:12) 02-24 10:18:55.334: I/dalvikvm(1088): at android.app.Activity.performCreate(Activity.java:5104) 02-24 10:18:55.334: I/dalvikvm(1088): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 02-24 10:18:55.344: I/dalvikvm(1088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 02-24 10:18:55.344: I/dalvikvm(1088): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 02-24 10:18:55.344: I/dalvikvm(1088): at android.app.ActivityThread.access$600(ActivityThread.java:141) 02-24 10:18:55.344: I/dalvikvm(1088): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 02-24 10:18:55.354: I/dalvikvm(1088): at android.os.Handler.dispatchMessage(Handler.java:99) 02-24 10:18:55.354: I/dalvikvm(1088): at android.os.Looper.loop(Looper.java:137) 02-24 10:18:55.354: I/dalvikvm(1088): at android.app.ActivityThread.main(ActivityThread.java:5039) 02-24 10:18:55.354: I/dalvikvm(1088): at java.lang.reflect.Method.invokeNative(Native Method) 02-24 10:18:55.354: I/dalvikvm(1088): at java.lang.reflect.Method.invoke(Method.java:511) 02-24 10:18:55.354: I/dalvikvm(1088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 02-24 10:18:55.354: I/dalvikvm(1088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 02-24 10:18:55.354: I/dalvikvm(1088): at dalvik.system.NativeStart.main(Native Method) 02-24 10:18:55.364: D/skia(1088): --- allocation failed for scaled bitmap 02-24 10:18:55.404: D/AndroidRuntime(1088): Shutting down VM 02-24 10:18:55.404: W/dalvikvm(1088): threadid=1: thread exiting with uncaught exception (group=0x40a70930) 02-24 10:18:55.515: E/AndroidRuntime(1088): FATAL EXCEPTION: main 02-24 10:18:55.515: E/AndroidRuntime(1088): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.iamgreat/com.example.iamgreat.GreatPiyu}: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown> 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread.access$600(ActivityThread.java:141) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.os.Handler.dispatchMessage(Handler.java:99) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.os.Looper.loop(Looper.java:137) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread.main(ActivityThread.java:5039) 02-24 10:18:55.515: E/AndroidRuntime(1088): at java.lang.reflect.Method.invokeNative(Native Method) 02-24 10:18:55.515: E/AndroidRuntime(1088): at java.lang.reflect.Method.invoke(Method.java:511) 02-24 10:18:55.515: E/AndroidRuntime(1088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 02-24 10:18:55.515: E/AndroidRuntime(1088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 02-24 10:18:55.515: E/AndroidRuntime(1088): at dalvik.system.NativeStart.main(Native Method) 02-24 10:18:55.515: E/AndroidRuntime(1088): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class <unknown> 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.createView(LayoutInflater.java:613) 02-24 10:18:55.515: E/AndroidRuntime(1088): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 02-24 10:18:55.515: E/AndroidRuntime(1088): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.Activity.setContentView(Activity.java:1881) 02-24 10:18:55.515: E/AndroidRuntime(1088): at com.example.iamgreat.GreatPiyu.onCreate(GreatPiyu.java:12) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.Activity.performCreate(Activity.java:5104) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 02-24 10:18:55.515: E/AndroidRuntime(1088): ... 11 more 02-24 10:18:55.515: E/AndroidRuntime(1088): Caused by: java.lang.reflect.InvocationTargetException 02-24 10:18:55.515: E/AndroidRuntime(1088): at java.lang.reflect.Constructor.constructNative(Native Method) 02-24 10:18:55.515: E/AndroidRuntime(1088): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.LayoutInflater.createView(LayoutInflater.java:587) 02-24 10:18:55.515: E/AndroidRuntime(1088): ... 23 more 02-24 10:18:55.515: E/AndroidRuntime(1088): Caused by: java.lang.OutOfMemoryError 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.content.res.Resources.loadDrawable(Resources.java:1965) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.View.<init>(View.java:3328) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.view.ViewGroup.<init>(ViewGroup.java:431) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.widget.LinearLayout.<init>(LinearLayout.java:176) 02-24 10:18:55.515: E/AndroidRuntime(1088): at android.widget.LinearLayout.<init>(LinearLayout.java:172) 02-24 10:18:55.515: E/AndroidRuntime(1088): ... 26 more 

Fuera de memoria en una asignación de 45349648 bytes creo que está utilizando un montón de imágenes y no es capaz de inflar todo de una vez.

Echa un vistazo a: http://developer.android.com/training/displaying-bitmaps/load-bitmap.html

  • Cómo tener una imagen de fondo de pantalla completa (con centro de cultivo) que no cambia el tamaño
  • Diferencia entre androide: orientación = "vertical" vs androide: orientación = "horizontal"
  • Android: cómo posicionar una imagen ligeramente fuera de una vista
  • Agregar Layout de forma programática dentro de otro
  • ¿Por qué utilizar un CardView en lugar de un RelativeLayout o LinearLayout?
  • Vista personalizada de Android delegado de grupo addView
  • ¿Cómo aumentar la altura de la fila de la tabla según las pantallas?
  • Disposiciones de Android para varios tamaños de pantalla
  • Cambiar el enfoque de reciclaje al último elemento de la lista
  • Descargar todas las imágenes de la carpeta en el servidor a local
  • Android paquete / nombre de la clase en la disposición XML?
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.