Autore Topic: Impossibile aprire pagina di un app solo su emulatore  (Letto 612 volte)

Offline maick94

  • Nuovo arrivato
  • *
  • Post: 8
  • Respect: 0
    • Mostra profilo
Impossibile aprire pagina di un app solo su emulatore
« il: 06 Maggio 2014, 00:10:18 CEST »
0
Buonasera a tutti...
io ho creato un semplice app che ha più activity e quando passo dalla prima activity alla seconda si blocca l'app e mi compare il seguente messaggio: unfortunately,(nome app) has stopped.
La cosa che mi fa impazzire e che prima funzionava (cioè mentre preparavo altre pagine); inoltre cosa molto IMPORTANTE che sul mio cellulare (htc one max) l'app funziona perfettamente.
Qundi vorrei sapere se il problema e per l'emulatore che uso che non è buono oppure c'è qualche errore nel mio codice

grazie a tutti per gli eventuali suggerimenti....
« Ultima modifica: 06 Maggio 2014, 15:48:45 CEST da maick94 »

Offline bradipao

  • Moderatore globale
  • Utente storico
  • *****
  • Post: 4043
  • keep it simple
  • Respect: +567
    • Github
    • Google+
    • bradipao
    • Mostra profilo
  • Dispositivo Android:
    Nexus 5
  • Play Store ID:
    Bradipao
  • Sistema operativo:
    W7
Re:Impossibile aprire pagina di un app solo su emulatore
« Risposta #1 il: 06 Maggio 2014, 07:01:13 CEST »
+1
È quasi certamente il codice. Nel LogCat trovi i messaggi di errore con indizi sulla causa.
NON rispondo a domande nei messaggi privati
Bradipao @ Play Store

Offline maick94

  • Nuovo arrivato
  • *
  • Post: 8
  • Respect: 0
    • Mostra profilo
Re:Impossibile aprire pagina di un app solo su emulatore
« Risposta #2 il: 06 Maggio 2014, 16:13:33 CEST »
0
ok adesso provo a postare la porzione di LogCat dove secondo me c'è un errore però non riesco a capire quale

05-06 14:06:48.040: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.510: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.531: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.540: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.551: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.581: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.581: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.654: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.690: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.821: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.940: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.940: I/Choreographer(831): Skipped 222 frames!  The application may be doing too much work on its main thread.
05-06 14:07:11.950: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:11.950: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.050: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.050: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.060: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.070: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.080: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.241: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.280: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.320: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.320: W/Trace(831): Unexpected value from nativeGetEnabledTags: 0
05-06 14:07:12.851: D/dalvikvm(831): GC_FOR_ALLOC freed 491K, 15% free 13604K/15880K, paused 141ms, total 184ms
05-06 14:07:12.851: I/dalvikvm-heap(831): Forcing collection of SoftReferences for 652208-byte allocation
05-06 14:07:13.120: D/dalvikvm(831): GC_BEFORE_OOM freed 53K, 15% free 13551K/15880K, paused 263ms, total 268ms
05-06 14:07:13.131: E/dalvikvm-heap(831): Out of memory on a 652208-byte allocation.
05-06 14:07:13.151: I/dalvikvm(831): "main" prio=5 tid=1 RUNNABLE
05-06 14:07:13.151: I/dalvikvm(831):   | group="main" sCount=0 dsCount=0 obj=0x40a719a0 self=0x2a00bba8
05-06 14:07:13.151: I/dalvikvm(831):   | sysTid=831 nice=0 sched=0/0 cgrp=apps handle=1073849308
05-06 14:07:13.151: I/dalvikvm(831):   | state=R schedstat=( 13972680337 4487388277 1793 ) utm=1299 stm=98 core=0
05-06 14:07:13.151: I/dalvikvm(831):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-06 14:07:13.151: I/dalvikvm(831):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
05-06 14:07:13.151: I/dalvikvm(831):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
05-06 14:07:13.151: I/dalvikvm(831):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)
05-06 14:07:13.151: I/dalvikvm(831):   at android.content.res.Resources.loadDrawable(Resources.java:1965)
05-06 14:07:13.151: I/dalvikvm(831):   at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
05-06 14:07:13.151: I/dalvikvm(831):   at android.view.View.<init>(View.java:3328)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.ViewGroup.<init>(ViewGroup.java:431)
05-06 14:07:13.161: I/dalvikvm(831):   at android.widget.LinearLayout.<init>(LinearLayout.java:176)
05-06 14:07:13.161: I/dalvikvm(831):   at android.widget.LinearLayout.<init>(LinearLayout.java:172)
05-06 14:07:13.161: I/dalvikvm(831):   at android.widget.TableLayout.<init>(TableLayout.java:105)
05-06 14:07:13.161: I/dalvikvm(831):   at java.lang.reflect.Constructor.constructNative(Native Method)
05-06 14:07:13.161: I/dalvikvm(831):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.LayoutInflater.createView(LayoutInflater.java:587)
05-06 14:07:13.161: I/dalvikvm(831):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
05-06 14:07:13.161: I/dalvikvm(831):   at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-06 14:07:13.171: I/dalvikvm(831):   at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-06 14:07:13.171: I/dalvikvm(831):   at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.Activity.setContentView(Activity.java:1881)
05-06 14:07:13.171: I/dalvikvm(831):   at com.example.test_gif.prima_pagina.onCreate(prima_pagina.java:62)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.Activity.performCreate(Activity.java:5104)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-06 14:07:13.171: I/dalvikvm(831):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-06 14:07:13.171: I/dalvikvm(831):   at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 14:07:13.200: I/dalvikvm(831):   at android.os.Looper.loop(Looper.java:137)
05-06 14:07:13.200: I/dalvikvm(831):   at android.app.ActivityThread.main(ActivityThread.java:5039)
05-06 14:07:13.220: I/dalvikvm(831):   at java.lang.reflect.Method.invokeNative(Native Method)
05-06 14:07:13.220: I/dalvikvm(831):   at java.lang.reflect.Method.invoke(Method.java:511)
05-06 14:07:13.220: I/dalvikvm(831):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-06 14:07:13.220: I/dalvikvm(831):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-06 14:07:13.220: I/dalvikvm(831):   at dalvik.system.NativeStart.main(Native Method)
05-06 14:07:13.260: D/skia(831): --- decoder->decode returned false
05-06 14:07:13.260: D/AndroidRuntime(831): Shutting down VM
05-06 14:07:13.270: W/dalvikvm(831): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
05-06 14:07:13.560: E/AndroidRuntime(831): FATAL EXCEPTION: main
05-06 14:07:13.560: E/AndroidRuntime(831): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.test_gif/com.example.test_gif.prima_pagina}: android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.TableLayout
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.os.Looper.loop(Looper.java:137)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread.main(ActivityThread.java:5039)
05-06 14:07:13.560: E/AndroidRuntime(831):    at java.lang.reflect.Method.invokeNative(Native Method)
05-06 14:07:13.560: E/AndroidRuntime(831):    at java.lang.reflect.Method.invoke(Method.java:511)
05-06 14:07:13.560: E/AndroidRuntime(831):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-06 14:07:13.560: E/AndroidRuntime(831):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-06 14:07:13.560: E/AndroidRuntime(831):    at dalvik.system.NativeStart.main(Native Method)
05-06 14:07:13.560: E/AndroidRuntime(831): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.TableLayout
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.createView(LayoutInflater.java:613)
05-06 14:07:13.560: E/AndroidRuntime(831):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-06 14:07:13.560: E/AndroidRuntime(831):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.Activity.setContentView(Activity.java:1881)
05-06 14:07:13.560: E/AndroidRuntime(831):    at com.example.test_gif.prima_pagina.onCreate(prima_pagina.java:62)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.Activity.performCreate(Activity.java:5104)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-06 14:07:13.560: E/AndroidRuntime(831):    ... 11 more
05-06 14:07:13.560: E/AndroidRuntime(831): Caused by: java.lang.reflect.InvocationTargetException
05-06 14:07:13.560: E/AndroidRuntime(831):    at java.lang.reflect.Constructor.constructNative(Native Method)
05-06 14:07:13.560: E/AndroidRuntime(831):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.LayoutInflater.createView(LayoutInflater.java:587)
05-06 14:07:13.560: E/AndroidRuntime(831):    ... 23 more
05-06 14:07:13.560: E/AndroidRuntime(831): Caused by: java.lang.OutOfMemoryError
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:785)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.content.res.Resources.loadDrawable(Resources.java:1965)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.View.<init>(View.java:3328)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.view.ViewGroup.<init>(ViewGroup.java:431)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.widget.LinearLayout.<init>(LinearLayout.java:176)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.widget.LinearLayout.<init>(LinearLayout.java:172)
05-06 14:07:13.560: E/AndroidRuntime(831):    at android.widget.TableLayout.<init>(TableLayout.java:105)
05-06 14:07:13.560: E/AndroidRuntime(831):    ... 26 more


spero che qualcuno sappia cosa sia grazie..