扩展图书馆 - "没有在路径上找到课程:DexPathList"

时间:2016-06-13 23:10:28

标签: java android ion

我正在成功扩展导入我的库的类。一切都运行良好,直到我尝试使用自定义类扩展它,在请求BasicNameValuePair时出错。该文件接近

的直接复制粘贴

https://github.com/koush/AndroidAsync/blob/8120535ef5cb053059b55f8e1c4fbe6c627ab160/AndroidAsync/src/com/koushikdutta/async/http/body/FilePart.java

public class CustomFilePart extends StreamPart {
    File file;
    public CustomFilePart(String name, final File file) {
        super(name, (int)file.length(), new ArrayList<NameValuePair>() {
            {
                add(new BasicNameValuePair("filename", file.getName()));
            }
        });

        getRawHeaders().set("Content-Type", "video/*");

        this.file = file;
    }

    @Override
    protected InputStream getInputStream() throws IOException {
        return new FileInputStream(file);
    }
}

摇篮

    compile 'com.koushikdutta.ion:ion:2.1.7'
    compile 'com.koushikdutta.async:androidasync:2.1.7'

0 个答案:

没有答案