• Register
0 votes

Problem :

I am beginner to Android Programming I am trying to draw the plot/chart for the very first time. Currently I am running different kinds of sample codes and my emulator is using three different types of free libraries but nothing is apearing in the layout screen. My logcat is repeating the below message:

 W/Trace(1378): Unexpected value from nativeGetEnabledTags: 0
 I/Choreographer(1378): Skipped 55 frames! The application may be doing too much work on its main thread.

How can I fix this issue?

8 4 2
2,300 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

I had faced this “Skipped 55 frames!" error in the recent past it means some heavy processing is going on in your application.

In my case there was not a single heavy process running in my application. So I just double checked everything and I tried to remove those process I thought were a bit heavy.

So I started removing the Fragments, Activities, and also Libraries until only my skeleton was left. But still my problem did not got fixed then I decided to check my resources and to my surprise I found some icons and backgrounds which I was using were very big as in hurry I forgot to cross check their size..

So I can tell you that if you are facing above issue then you must first check your resource files size.

5 2 1
4,980 points
0 votes


To avoid that the listview component

public async Task Async_llenarListView(){
await Task.Run(() => {
string[] _equipos = { "Los Angeles Lakers", "Golden State Warriors", "Boston Celtics"};
for (int i = 0; i < _equipos.Length; i++){
                _lista.Add(new model_equipos{
                    _id = i,
                    _source = "team" + (i + 1),
                    _nombreEquipo = _equipos[i],
                    _siglas = _siglas[i],
                    _votos = new Random().Next(0, 100) + ""

To call a Page

private void mc_btn_sinCuentaAsync(object obj){
Application.Current.MainPage.Navigation.PushAsync(new mdp());

Wiht the slow scroll you used the ListViewCachingStrategy and set them with RecycleElement. And may be your ListView Scroll have a fluid scroll now.

I solved this problem by changing in Manifest file hardwareAccelerated option to true like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    <application android:hardwareAccelerated="true">

Fixing this requires identifying nodes where there is or possibly can happen long duration of processing. The best way is to do all the processing no matter how small or big in a thread separate from main UI thread. So be it accessing data form SQLite Database or doing some hardcore maths or simply sorting an array – Do it in a different thread

Now there is a catch here, You will create a new Thread for doing these operations and when you run your application, it will crash saying “Only the original thread that created a view hierarchy can touch its views“. You need to know this fact that UI in android can be changed by the main thread or the UI thread only. Any other thread which attempts to do so, fails and crashes with this error. What you need to do is create a new Runnable inside runOnUiThread and inside this runnable you should do all the operations involving the UI. 

So we have Thread and Runnable for processing data out of main Thread, what else? There is AsyncTask in android which enables doing long time processes on the UI thread. This is the most useful when you applications are data driven or web api driven or use complex UI’s like those build using Canvas. The power of AsyncTask is that is allows doing things in background and once you are done doing the processing, you can simply do the required actions on UI without causing any lagging effect. This is possible because the AsyncTask derives itself from Activity’s UI thread – all the operations you do on UI via AsyncTask are done is a different thread from the main UI thread, No hindrance to user interaction.

10 6 4
31,120 points

Related questions

0 votes
1 answer 10 views
the application may be doing too much work on its main thread.
asked Feb 16 ArifulIslam 7.5k points
0 votes
1 answer 2 views
Problem: I've built a simple music player in Android. The view for each song contains a SeekBar, implemented like this: public class Song extends Activity implements OnClickListener,Runnable { private SeekBar progress; private MediaPlayer mp; // ... private ServiceConnection onService = ... SeekBar - creating the view in onCreate, then touching it in run() - and it doesn't give me this complaint.
asked Apr 26 sumaiya simi 43.9k points
0 votes
1 answer 11 views
Problem: I've built a simple music player in Android. The view for each song contains a SeekBar which works fine. Now I want a timer counting the seconds/minutes of the progress of the song. So I put a TextView in the layout, get it with findViewById() in onCreate(), ... I'm doing with the SeekBar - creating the view in onCreate, then touching it in run() - and it doesn't give me this complaint.
asked Apr 30 muktaa 34.6k points
0 votes
1 answer 85 views
Problem : I have tried to built a simple music player in Android. My view for each song contains the SeekBar. It works fine for me. Now I want the timer counting the seconds/minutes of a progress of a song. So I put the TextView in a layout, get it with the ... doing with my SeekBar - creating a view in onCreate, then just touching it in run() &ndash; and then it doesn't give me any complaint.
asked Jan 28, 2020 jwilliam 3.9k points
0 votes
1 answer 4 views
Problem: If you could lead me in the right way, I would appreciate it.
asked Apr 13 zayed1 61.8k points
0 votes
1 answer 8 views
Problem: The application called an interface that was marshalled for a different thread.
asked Apr 28 Ryan evans 1.5k points
0 votes
1 answer 31 views
Problem: RuntimeError: main thread is not in main loop,I am making an error somehow ... Can someone please help me out?
asked Apr 14 sumaiya simi 43.9k points
0 votes
1 answer 17 views
Problem: I am stuck with this ... Please help me that how to deal with this error? you are doing that too much. try again in 8 minutes
asked Mar 23 Ifra 37.2k points
0 votes
1 answer 5 views
Question: Suppose, I have a webserver which holds numerous servlets. For information passing among those servlets I am setting session and instance variables. Now, if 2 or more users send request to this server then what happens to the session variables? Will they ... user accessed it or does it get instantiated for all the users separately? In other words, what happens to the instance variables?
asked Apr 12 Atik03 26.5k points
0 votes
1 answer 9 views
Problem: How to make Google Now run continually in the background on Android.Any ideas on what I need to do to fix this? Thanks!
asked Mar 15 ummesalma 29.2k points