小编kas*_*ahi的帖子

错误:(28,13)无法解决:com.squareup.okhttp3:okhttp:3.2.0

我有android studio的问题.

我已经从这个链接添加了okhttp的.jar文件:https://github.com/square/okhttp到我的android studio上的libs目录.当我尝试添加这一行时:在build.gradle(Module:app)的依赖项中编译'com.squareup.okhttp3:okhttp:3.2.0',在尝试同步之后我得到错误28,13.实际上之后研究我发现我无法编译依赖项中的任何内容并同步它记住我已经检查了我的"android SDK构建工具"已安装.

听到我在build.gradle(app)目录中的所有代码:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

 defaultConfig {
        applicationId "com.example.kasra.stormy"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'], )
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile files('libs/okhttp-3.2.0.jar')
    compile 'com.squareup.okhttp3:okhttp:3.2.0'
}
Run Code Online (Sandbox Code Playgroud)

如果有人帮助我解决这个问题,我将非常高兴和感激.

非常感谢你:)

android gradle android-gradle-plugin okhttp

8
推荐指数
3
解决办法
1万
查看次数

标签 统计

android ×1

android-gradle-plugin ×1

gradle ×1

okhttp ×1