我在一个安卓设备上崩溃了,它显示了android.os.NetworkOnMainThreadException在AsyncTask中的一个例外。我为什么要得到这个例外?public class MainActivity extends AppCompatActivity {
RecyclerView.LayoutManagersuper.onCreate(savedInstanceState);
s
LoadIconTask是AsyncTask的一个子类,太多的AsyncTask同时运行会导致RejectedExecutionException。堆栈的示例启动: at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339)
at andro
没有错误,一切都很好,但是当我切换活动时,蓝牙断开了连接,而且它也没有显示状态改变。re-build the wheel over here * private class SearchDevices extends AsyncTaskthis.unregisterReceiver(mReceiver); }
class ConnectBT extends AsyncTask