无法解决:appcompat-v7 android studio 3.2.1

时间:2018-10-25 20:12:09

标签: android appcompat-v7 buildbox

我导出了Build box项目并在Android Studio上将其打开。但是无法构建它。我收到此错误。

  

无法解决:appcompat-v7

成绩文件

    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 //
}

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

1 个答案:

答案 0 :(得分:1)

在依赖项中添加它:

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

将此添加到项目gradle中

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