Ошибка синхронизации Gradle Android Studio после обновления до 3.2.1 - PullRequest
0 голосов
/ 11 декабря 2018

У меня был хорошо работающий андроид-проект, но внезапно я столкнулся с некоторыми ошибками, которые заставили меня обновить мою андроид-студию до 3.2.1 и перейти на 4.6.Мой код такой же, как у моего коллеги (все коды и версии), за исключением одной строки в Gradle, которую я объясню позже, он может легко построить, но я не могу из-за следующих ошибок:

Failed to resolve: espresso-core
Open File


Failed to resolve: multidex-instrumentation
Open File

app.gradle:

    apply plugin: 'com.android.application'
    android {
        compileSdkVersion 27
        buildToolsVersion '28.0.3'
        defaultConfig {
            applicationId "com.arnick.bazim"
            minSdkVersion 15
            targetSdkVersion 27
            versionCode 1
            versionName "0.7"
            multiDexEnabled true
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            manifestPlaceholders = [onesignal_app_id               : "xxxxxxxxxxxxxx",

                                    onesignal_google_project_number: "REMOTE"]
        }
        applicationVariants.all { variant ->
            variant.resValue "string", "versionName", variant.versionName
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    repositories {
        jcenter()
    }
    dependencies {
        implementation 'com.android.support:recyclerview-v7:27.1.1' 
// the above line is showing error to me, error is about some version mismatching
// even by doing what it says the error does not disappear
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        implementation 'com.getkeepsafe.taptargetview:taptargetview:1.11.0'
        implementation 'com.stephentuso:welcome:1.4.1'
        implementation 'co.ronash.android:pushe-base:1.4.0'
        implementation 'com.google.android.gms:play-services-gcm:16.0.0'
        implementation 'com.google.android.gms:play-services-location:16.0.0'
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation 'com.android.support:multidex:1.0.3'
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support:cardview-v7:27.1.1'
        implementation 'com.android.support:design:27.1.1'
        implementation 'com.android.support:support-v4:27.1.1'
        implementation 'com.android.support:customtabs:27.1.1'
        implementation 'com.google.android.gms:play-services-auth:16.0.1'
        implementation 'com.google.code.gson:gson:2.8.2'
        implementation('io.socket:socket.io-client:1.0.0') {
            // excluding org.json which is provided by Android
            exclude group: 'org.json', module: 'json'
        }
        implementation 'com.android.volley:volley:1.1.0'
        testImplementation 'junit:junit:4.12'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    }

    apply plugin: 'com.google.gms.google-services'

gradle проекта:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

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

Я очистил, перестроил, аннулировал кеш, перезапустил и все, что я видел онлайн.Я даже меняю maven reposiroty url на 2 или 3, но ошибка сохраняется.Что я должен делать?Тпй

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...