Не могу найти зависимость от областиAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Не могу найти зависимость от области

Сообщение Anonymous »

Поэтому мой проект не может разрешить зависимость от области. Я использовал Realm много раз и раньше не сталкивался с этой проблемой – надеюсь, я просто устал и упускаю что-то глупое и очевидное.
Я следовал инструкциям здесь:
https://docs.mongodb.com/realm-legacy/d ... stallation
И другие ответы SO, но мне не повезло... вот мои файлы Gradle
project gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.0"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
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 "io.realm:realm-gradle-plugin:10.0.1"
}
}

allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}

}

task clean(type: Delete) {
delete rootProject.buildDir
}

app gradle file
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
}
apply plugin: 'realm-android'

android {
compileSdkVersion 30

defaultConfig {
applicationId "ca.test.sdkpackedtest"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
api 'com.google.android.material:material:1.2.1'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'

testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Ошибка:
A problem occurred configuring root project 'SDKPackedTest'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find io.realm:realm-gradle-plugin:10.0.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2 ... 10.0.1.pom
- https://repo.maven.apache.org/maven2/io ... 10.0.1.pom
Required by:
project :

Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/usergui ... ories.html



Подробнее здесь: https://stackoverflow.com/questions/681 ... dependency
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»