android.os.NetworkOnMainThreadException 异常

记下来以后备用

StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()

			.detectDiskReads()

			.detectDiskWrites()

			.detectNetwork()

			.penaltyLog()

			.build());

StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()

			.detectLeakedSqlLiteObjects()

			.detectLeakedClosableObjects()

			.penaltyLog()

			.penaltyDeath()

			.build());

  

你可能感兴趣的:(exception)