Je tente d'utiliser la base de données Realm
dans mon projet, j'ajoute
classpath "io.realm:realm-gradle-plugin:5.9.0"
à build.gradle
et
apply plugin: 'realm-android'
à build.gradle
du module, après avoir cliqué sur synchroniser, j'obtiens cette erreur :
Configuration with name 'kapt' not found.
Contenu de build.gradle
:
buildscript {
ext.kotlin_version = '1.3.21'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
classpath 'com.novoda:bintray-release:0.9'
classpath "io.realm:realm-gradle-plugin:5.9.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
Contenu de build.gradle
du module :
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.jakewharton.hugo'
apply plugin: 'com.novoda.bintray-release'
apply plugin: 'realm-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
defaultConfig {
applicationId "xx.xxxxx.xxxxxxxx"
minSdkVersion 21
versionCode 1
versionName "1"
vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
...