java无法解析主机名意味着如何在安卓 studio的异步任务中解析主机名
无法解析主机名 以下是下面的片段:
public class Main2Activity extends Activity {
// button to show progress dialog
Button btnShowProgress;
// Progress Dialog
private ProgressDialog pDialog;
ImageView my_image;
// Progress dialog type (0 - for Horizontal progress bar)
public static final int progress_bar_type = 0;
// File url to download
private static String file_url = "https://www.tutorialspoint.com/images/tp-logo-diamond.png";
}
# 1 楼答案
检查您是否未在AndroidMenifext中使用internet权限。xml
也可以在运行时请求相同的权限