我是Android应用程序开发的一个菜鸟。在学习教程的同时。我被困在我的应用程序总是崩溃,让我重新启动我的电脑。然后我认为这是错误崩溃的来源:
这是我的应用
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.espina.mamshi"
minSdkVersion 15
targetSdkVersion 26
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
按照教程我添加了这个:
compile 'com.android.support:design:25.3.1'
但它似乎就是红色的说法
This support library should not use a different version (25) than the compileSdkVersion(26)
在这里
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
它表示无法解析符号DependencyResolveDetails
任何帮助都是适用的。