[英]Failed to resolve: com.android.support: design-v7:25.3.1
This is for my school project. 这是我学校的项目。 I've got 1 error from my code; 我的代码中有1个错误;
Failed to resolve: com.android.support:design-v7:25.3.1 无法解决:com.android.support:design-v7:25.3.1
I've been done these things: a. 我已经完成了这些事情: Configure my project structure into 25. b. 将我的项目结构配置为25。 Added compile 'com.android.support:support-core-utils:25.3.1' on my dependencies gradle. 在我的依赖项gradle上添加了编译'com.android.support:support-core-utils:25.3.1'。 C. update my another gradle with this code d. C.用此代码d更新我的另一个gradle。 Download Android API 25 on my SDK manager 在我的SDK管理器上下载Android API 25
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
And, I still got that error message. 而且,我仍然收到该错误消息。
This is my full code for build.gridle: 这是我的build.gridle完整代码:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.lenovo.home"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:cardview-v7:25.3.1'
compile 'com.android.support:design-v7:25.3.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
Use: 采用:
compile 'com.android.support:design:25.3.1'
Instead of 代替
compile 'com.android.support:design-v7:25.3.1'
AS 如
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.lenovo.home"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-core-utils:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.