【发布时间】:2016-07-16 03:00:42
【问题描述】:
我的 android studio 有问题。
我已经从这个链接添加了 okhttp 的 .jar 文件:https://github.com/square/okhttp 到我的 android 工作室的 libs 目录中。当我尝试添加这一行时:在 build.gradle(Module:app) 的依赖项中编译 'com.squareup.okhttp3:okhttp:3.2.0',在尝试同步它后我得到错误 28、13。实际上之后研究我发现我无法编译依赖项中的任何内容并同步它记得我已经检查过我的“android SDK build tool”是否已安装。
听到的是我在 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'
}
如果有人帮我解决这个问题,我会非常高兴和感激。
非常感谢:)
【问题讨论】:
标签: android gradle android-gradle-plugin okhttp