我在应用Gradle中收到此错误消息:
无法解决:com.android.databinding:library:3.3.2
我在另一个问题中看到它是因为在Gradle中我不喜欢我的Gradle
这是我的应用程序Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.ophiropt.meissa"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++1z -frtti -fexceptions" } }
ndk {
abiFilters 'armeabi-v7a' }
vectorDrawables.useSupportLibrary = true}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}}
dataBinding {
enabled = true }
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
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.0.1'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.couchbase.lite:couchbase-lite-android:1.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile "com.android.support:recyclerview-v7:25.0.0"
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:design:25.0.1'
compile 'org.greenrobot:eventbus:3.0.0'
testCompile 'junit:junit:4.12'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.elmargomez.typer:typerlib:1.0.0'
compile (name:'charting-release', ext:'aar')
compile (name:'drawing-release', ext:'aar')
compile (name:'data-release', ext:'aar')
compile (name:'core-release', ext:'aar')
compile 'com.android.support.constraint:constraint-layout:1.0.2'
}
你需要一个google()
依赖:
buildscript {
repositories {
google() // here
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
}
allprojects {
repositories {
google() // and here
jcenter()
}
我的问题是,使用Gradle gradle:3.3.2的最小SDK版本必须是28,而对我来说,它是25