添加依赖项时,我无法找出确切的问题。
dependencies {
compile 'com.github.jetradarmobile:android-snowfall:1.1.2'
}
我收到上述错误
my Gradle(Project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
}
}
allprojects {
repositories {
jcenter() {
maven { url "https://jitpack.io" }
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我的 Gradle (应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.animationbook.animationbook"
minSdkVersion 15
targetSdkVersion 24
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(include: ['*.jar'], dir: 'libs')
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:24.2.1'
debugCompile 'junit:junit:4.12'
compile 'com.github.moondroid.coverflow:library:1.0'
compile 'com.github.jetradarmobile:android-snowfall:1.1.2'
}
如何解决错误?
最佳答案
发生这种情况是因为您的依赖项com.github.jetradarmobile:android-snowfall:1.1.2
具有compileSdkVersion 25
,buildToolsVersion "25.0.2"
和com.android.support:support-compat:25.0.1
。
因此,您需要将com.android.support:appcompat-v7:24.2.1
更改为com.android.support:appcompat-v7:25.1.0
,将buildToolsVersion
更改为25.0.1
和com.android.support:design:25.1.0
。
如果您不想更改buildToolsVersion
,则可以使用它的模块并更改模块buildToolsVersion
。
关于android - 无法解析: com. android.support :support-compat: 25. 0.1。?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/41374799/