题库 软件开发 题目列表 下面代码放在主线程中运行会引发ANR错误的选项是?
单选题

下面代码放在主线程中运行会引发ANR错误的选项是?

A.

Toast.makeText(getApplicationContext(),"hello world",Toast.LENGTH_LONG).show();

B.

mHandler.postDelayed(new Runnable() {<br>@Override<br>public void run() {<br>Toast.makeText(getApplicationContext(),&quot;hello world&quot;,Toast.LENGTH_SHORT).show();<br>}<br>},5000);

C.

LayoutInflater.from(context).inflate(R.layout.something_layout, null);

D.

HttpURLConnection urlConn = (HttpURLConnection) new URL(&quot;https://www. iqiyi.com&quot;).openConnection();

题目信息
校招真题
-
正确率
0
评论
11
点击