Я работаю над тестовым проектом в Kotlin, который использует архитектуру Mvvm с комнатой. после добавления зависимостей и библиотек для проекта, проект строится успешно, но когда я пытаюсь запустить приложение, он показывает эту ошибку
Не удалось найти android .room: room-complier: 2.2.4. Поиск в следующих местах: - https://dl.google.com/dl/android/maven2/android/room/room-complier/2.2.4/room-complier-2.2.4.pom - https://dl.google.com/dl/android/maven2/android/room/room-complier/2.2.4/room-complier-2.2.4.jar - https://jcenter.bintray.com/android/room/room-complier/2.2.4/room-complier-2.2.4.pom - https://jcenter.bintray.com/android/room/room-complier/2.2.4/room-complier-2.2.4.jar - https://jitpack.io/android/room/room-complier/2.2.4/room-complier-2.2.4.pom - https://jitpack.io/android/room/room-complier/2.2.4/room-complier-2.2.4.jar Требуется: project: app
это мой уровень приложения build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
//kotlin Kapt and navigation safeargs plugin
apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.cruxrepublic.mvvmapplication"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// Retrofit and Gson
implementation 'com.squareup.retrofit2:retrofit:2.7.0'
implementation 'com.squareup.retrofit2:converter-gson:2.7.0'
// kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
// New Material Design
implementation 'com.google.android.material:material:1.2.0-alpha03'
// Kodein Dependency Injection
implementation "org.kodein.di:kodein-di-generic-jvm:6.2.1"
implementation "org.kodein.di:kodein-di-framework-android-x:6.2.1"
// Android Room
implementation "androidx.room:room-runtime:2.2.4"
implementation "androidx.room:room-ktx:2.2.4"
kapt "android.room:room-complier:2.2.4"
// kapt 'androidx.room:room-compiler:2.1.0-alpha04'
// Android Navigation Architecture
implementation "androidx.navigation:navigation-fragment-ktx:2.2.0-rc04"
implementation "androidx.navigation:navigation-ui-ktx:2.2.0-rc04"
}
Этот уровень сборки мю проекта. файл градля
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0-alpha02"
}
}
allprojects {
repositories {
google()
jcenter()
maven {url 'https://jitpack.io'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}