解决方法:
在主线程
iv_tupian=(ImageView) findViewById(R.id.iv_tupian);
下面添加
if (android.os.Build.VERSION.SDK_INT > 9) {
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
即可解决
网友评论