作者:高飘琼里15 | 来源:互联网 | 2023-05-19 20:29
这是我第一次尝试使用gradle和android项目.我想对我的项目添加改造,但它一直在告诉我.
无法解决:com.squareup.retrofit:retrofit:1.9.0
无法解决:com.squareup.okhttp:2.2.0
但是,谷歌播放服务运作完美.
我的gradle文件如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "test.gradel"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile group: "com.squareup.retrofit", name: "retrofit", version: "1.9.0"
compile group: "com.squareup.okhttp", name: "okhttp", version: "2.2.0"
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2'
}
}
任何帮助将不胜感激.
谢谢