0

При попытке синхронизации Gradle файла появилась ошибка

ERROR: Failed to resolve: androidx.navigation:navigation-runtime:[2.2.0]

При выполнении дествия Build -> Clean project Появляется следующая ошибка

Could not find any matches for androidx.navigation:navigation-runtime:[2.2.0] as no versions of androidx.navigation:navigation-runtime are available.
Required by:
    project :app > androidx.navigation:navigation-fragment:2.2.0
    project :app > androidx.navigation:navigation-ui:2.2.0
Search in build.gradle files

Мой Gradle файл

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId ".MyApp"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation "androidx.room:room-rxjava2:2.2.3"
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

    implementation "androidx.room:room-runtime:2.2.3"
    annotationProcessor  "androidx.room:room-compiler:2.2.3"

    implementation 'com.squareup.retrofit2:retrofit:2.7.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
    implementation 'androidx.navigation:navigation-fragment:2.2.0'
    implementation 'androidx.navigation:navigation-ui:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    //noinspection LifecycleAnnotationProcessorWithJava8
    annotationProcessor  "androidx.lifecycle:lifecycle-compiler:2.2.0"
    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

В подобных вопросах рекомендуют обновить версию библиотеки, но студия не предлагает мне обновиться.

1 ответ 1

1

Я понял в чем причина данной ошибки. Из-за санкций я могу юзать гугловские библиотеки только через VPN, который я благополучно забыл подключить.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.