Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
566 views
in Technique[技术] by (71.8m points)

android - MultipartBuilder can't be resolved in okhttp:3.0.0-RC1

I have used okhttp and It's working fine with following dependency:

compile 'com.squareup.okhttp:okhttp:2.3.0'

Recently I have updated with:

compile 'com.squareup.okhttp3:okhttp:3.0.0-RC1'

It shows error like MultipartBuilder can't be resolved.

I am uploading image with my Previous Answer of Uploading File.

Is there any way to achieve the same thing using okhttp:3.0.0-RC1 ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It is called MultipartBody.Builder now. From the ChangeLog:

Form and Multipart bodies are now modeled. We've replaced the opaque FormEncodingBuilder with the more powerful FormBody and FormBody.Builder combo. Similarly we've upgraded MultipartBuilder into MultipartBody, MultipartBody.Part, and MultipartBody.Builder.

You can read more here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...