HttpUtils utils =new HttpUtils(); final String target = Environment.getExternalStorageDirectory() + "/update.apk"; utils.download(mDownloadURL, target, new RequestCallBack<File>() { @Override public void onSuccess(ResponseInfo<File> responseInfo) { Toast.makeText(SplashActivity.this, "下载成功", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(Intent.ACTION_VIEW); intent.addCategory(Intent.CATEGORY_DEFAULT); intent.setDataAndType(Uri.fromFile(responseInfo.result), "application/vnd.android.package-archive"); startActivityForResult(intent, 0); } @Override public void onLoading(long total, long current, boolean isUploading) { int progress = (int) ((current * 100) / total); tvProgress.setText("下载进度:" + progress + "%"); } @Override public void onFailure(HttpException e, String s) { Toast.makeText(SplashActivity.this, "下载失败", Toast.LENGTH_SHORT).show(); } });