CERCA
PER MODELLO
FullScreen Chatbox! :)

Utente del giorno: SteweEliteModder con ben 1 Thanks ricevuti nelle ultime 24 ore
Utente della settimana: gianpassa con ben 16 Thanks ricevuti negli ultimi sette giorni
Utente del mese: gianpassa con ben 45 Thanks ricevuti nell'ultimo mese

Visualizzazione dei risultati da 1 a 1 su 1
Discussione:

Problemi di memoria

Se questa discussione ti Ŕ stata utile, ti preghiamo di lasciare un messaggio di feedback in modo che possa essere preziosa in futuro anche per altri utenti come te!
  1. #1
    Baby Droid


    Registrato dal
    May 2013
    Messaggi
    8

    Ringraziamenti
    0
    Ringraziato 0 volte in 0 Posts
    Predefinito

    Problemi di memoria

    Salve a tutti,
    ho sviluppato un app che spesso crasha... Dal log sembra un problema di memoria... Vi posto alcuni log...

    Qui sembra dovuto ad una Bitmap...
    codice:
    com.actionbarsherlock.internal.ActionBarSherlockNative.setContentView(ActionBarSherlockNative.java:133)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:229)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at com.ibetterapp.activity.SearchNewFriendsActivity.onCreate(SearchNewFriendsActivity.java:41)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.app.Activity.performCreate(Activity.java:5372)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     ... 11 more
    01-16 22:30:52.645: E/AndroidRuntime(8383): Caused by: java.lang.reflect.InvocationTargetException
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at java.lang.reflect.Constructor.constructNative(Native Method)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.view.LayoutInflater.createView(LayoutInflater.java:600)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     ... 27 more
    01-16 22:30:52.645: E/AndroidRuntime(8383): Caused by: java.lang.OutOfMemoryError
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.content.res.Resources.loadDrawable(Resources.java:2988)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.widget.ImageView.<init>(ImageView.java:131)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     at android.widget.ImageView.<init>(ImageView.java:121)
    01-16 22:30:52.645: E/AndroidRuntime(8383):     ... 30 more
    codice:
    01-16 22:38:02.265: E/AndroidRuntime(10953): FATAL EXCEPTION: main
    01-16 22:38:02.265: E/AndroidRuntime(10953): java.lang.OutOfMemoryError
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.content.res.Resources.loadDrawable(Resources.java:2988)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.content.res.Resources.getDrawable(Resources.java:1558)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.ImageView.resolveUri(ImageView.java:646)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.ImageView.setImageResource(ImageView.java:375)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at com.ibetterapp.adapter.AppSettingAdapter.getView(AppSettingAdapter.java:77)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:230)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.AbsListView.obtainView(AbsListView.java:2608)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1259)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.ListView.onMeasure(ListView.java:1171)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.View.measure(View.java:16831)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.View.measure(View.java:16831)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.View.measure(View.java:16831)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:302)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.View.measure(View.java:16831)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5245)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    01-16 22:38:02.265: E/AndroidRuntime(10953):     at
    Volevo chiedervi quel'Ŕ il migliore approccio secondo voi...

    Io ho una activity principale dalla quale si apre il menu delle impostazioni ed altre pagine... il fluppo poi ritorna sempre alla home... per tale motivo ho impostato la home come singleTask e per le altre non ho impostato nulla... utilizzo sharlock per la retro compatibilitÓ...

    Qualche consiglio?

    Grazie

  2.  

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire risposte
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Torna su
Privacy Policy