Я не могу осуществить модернизацию в kotlin - PullRequest
0 голосов
/ 10 января 2020

Я следую этому уроку: https://www.youtube.com/watch?v=w6MvFXz5ecA Я пытаюсь синхронизировать c дооснащение со следующими строками в app.gradle в новом пустом проекте:

implementation 'com.squareup.retrofit2:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

Но когда я синхронизирую c, я получаю эту ошибку: ОШИБКА: Не удалось разрешить: com.squareup.retrofit2: 2.3.0: Затронутые модули: приложение

Полное содержимое build.gradle ( Модуль: app):

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.1"
    defaultConfig {
        applicationId "com.smartherd.retrofityt"
        minSdkVersion 19
        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.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'com.squareup.retrofit2:2.5.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
}

Дополнительные данные:

Я использую Android studio 3.5.3

Android SDK Toools 26.1.1

дооснащение 2.5.0

1 Ответ

0 голосов
/ 11 января 2020

Вам не хватает идентификатора артефакта, retrofit:

implementation 'com.squareup.retrofit2:retrofit:2.5.0'
...