阅读背景:

OKHttp post Stream (upload File with params)

来源:互联网 

 首先在项目的build.gradle中添加 okhttp 的引用

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
    compile 'com.squareup.okhttp3:okhttp:3.4.1'
    compile 'com.google.code.gson:gson:2.8.2'
    testCompile 'junit:junit:4.12'
}depende



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: