开发者社区> 问答> 正文

如何在android studio的async任务中解析主机名

我无法解析主机名。以下是代码段

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"; }

展开
收起
小六码奴 2019-10-10 18:36:43 734 0
1 条回答
写回答
取消 提交回答
  • 检查你是否未在AndroidMenifext.xml中使用互联网权限

    还要在运行时请求相同的权限。

    2019-10-10 18:37:08
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
神龙云服务器产品及技术深度解析 立即下载
弹性创造价值:基于ECS的最佳性价比实践解析 立即下载
又快又稳:阿里云下一代虚拟交换机解析 立即下载

相关镜像