在你的OkHttpManager类中buildRequestBody方法中
if (null != mType && null != mFile) {
RequestBody requestBody = new RequestBody() {
@OverRide
public MediaType contentType() {
return mType;
}
@OverRide
public void writeTo(BufferedSink sink) throws IOException {
sink = mSink;
}
};
builder.post(requestBody);
return;
}
此处的null !=mFile应为null !=mSink
在你的OkHttpManager类中buildRequestBody方法中
if (null != mType && null != mFile) {
RequestBody requestBody = new RequestBody() {
@OverRide
public MediaType contentType() {
return mType;
}
@OverRide
public void writeTo(BufferedSink sink) throws IOException {
sink = mSink;
}
};
builder.post(requestBody);
return;
}
此处的null !=mFile应为null !=mSink