注册 登录
编程论坛 Android开发

FinalHttp http = new FinalHttp();闪退

keyii 发布于 2022-02-12 17:51, 4130 次点击
public void download(String url) {

       FinalHttp http = new FinalHttp(); // 只要有这句就会闪退
        if (!isExternalStorageAvaliable()) {
            return;
        }
        String apkPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/single.apk";
        File f = new File(apkPath);
        if(f.exists()){
            f.delete();
        }

        http.download(url, apkPath, callBack);
    }
只有本站会员才能查看附件,请 登录

0 回复
1