The application may be doing too much work on its main thread

Warning: The application may be doing too much work on its main thread
Try this sorce code:

import android.os.StrictMode;
 
public class MyActivity extends Activity {
	static{
		StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
		StrictMode.setThreadPolicy(policy);
	}
	@Override
    public void onCreate(Bundle savedInstanceState) {
//.................. etc.
This entry was posted in Android Examples Code, Bugs, warnings, errors and tagged . Bookmark the permalink.


Comments are closed.



16,628 views