解析失败:appcompat-v7 android studio 3.2.1

Failed to resolve: appcompat-v7 android studio 3.2.1

我导出了我的 Build box 项目并在 Android studio 上打开了它。但是无法构建 it.I 出现此错误。

Failed to resolve: appcompat-v7

Gradle 文件

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.test.test1"
        minSdkVersion 16
        targetSdkVersion 26
        multiDexEnabled true

        ndk {
            moduleName "player_shared"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
}

dependencies {
    implementation 'com.google.android.gms:play-services:+'
    implementation 'com.android.support:multidex:1.0.3'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    // More deps here //
}

有人知道如何解决这个问题吗?

在依赖项中添加:

implementation 'com.android.support:appcompat-v7:27.1.1'

在项目中添加这个 gradle

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